Merge "Add PG UI support for new changes with base commit"
This commit is contained in:
@@ -72,6 +72,17 @@ limitations under the License.
|
|||||||
</gr-autocomplete>
|
</gr-autocomplete>
|
||||||
</span>
|
</span>
|
||||||
</section>
|
</section>
|
||||||
|
<section class$="[[_computeBranchClass(baseChange)]]">
|
||||||
|
<span class="title">Provide base commit sha1 for change</span>
|
||||||
|
<span class="value">
|
||||||
|
<input
|
||||||
|
is="iron-input"
|
||||||
|
id="baseCommitInput"
|
||||||
|
maxlength="40"
|
||||||
|
placeholder="(optional)"
|
||||||
|
bind-value="{{baseCommit}}">
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<span class="title">Enter topic for new change</span>
|
<span class="title">Enter topic for new change</span>
|
||||||
<span class="value">
|
<span class="value">
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
baseChange: String,
|
baseChange: String,
|
||||||
|
baseCommit: String,
|
||||||
privateByDefault: String,
|
privateByDefault: String,
|
||||||
canCreate: {
|
canCreate: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -73,7 +74,8 @@
|
|||||||
const isPrivate = this.$.privateChangeCheckBox.checked;
|
const isPrivate = this.$.privateChangeCheckBox.checked;
|
||||||
const isWip = true;
|
const isWip = true;
|
||||||
return this.$.restAPI.createChange(this.repoName, this.branch,
|
return this.$.restAPI.createChange(this.repoName, this.branch,
|
||||||
this.subject, this.topic, isPrivate, isWip, this.baseChange)
|
this.subject, this.topic, isPrivate, isWip, this.baseChange,
|
||||||
|
this.baseCommit)
|
||||||
.then(changeCreated => {
|
.then(changeCreated => {
|
||||||
if (!changeCreated) { return; }
|
if (!changeCreated) { return; }
|
||||||
Gerrit.Nav.navigateToChange(changeCreated);
|
Gerrit.Nav.navigateToChange(changeCreated);
|
||||||
|
@@ -1410,9 +1410,10 @@
|
|||||||
* @param {boolean=} opt_isPrivate
|
* @param {boolean=} opt_isPrivate
|
||||||
* @param {boolean=} opt_workInProgress
|
* @param {boolean=} opt_workInProgress
|
||||||
* @param {string=} opt_baseChange
|
* @param {string=} opt_baseChange
|
||||||
|
* @param {string=} opt_baseCommit
|
||||||
*/
|
*/
|
||||||
createChange(project, branch, subject, opt_topic, opt_isPrivate,
|
createChange(project, branch, subject, opt_topic, opt_isPrivate,
|
||||||
opt_workInProgress, opt_baseChange) {
|
opt_workInProgress, opt_baseChange, opt_baseCommit) {
|
||||||
return this.send('POST', '/changes/', {
|
return this.send('POST', '/changes/', {
|
||||||
project,
|
project,
|
||||||
branch,
|
branch,
|
||||||
@@ -1421,6 +1422,7 @@
|
|||||||
is_private: opt_isPrivate,
|
is_private: opt_isPrivate,
|
||||||
work_in_progress: opt_workInProgress,
|
work_in_progress: opt_workInProgress,
|
||||||
base_change: opt_baseChange,
|
base_change: opt_baseChange,
|
||||||
|
base_commit: opt_baseCommit,
|
||||||
}).then(response => this.getResponseObject(response));
|
}).then(response => this.getResponseObject(response));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user