summaryrefslogtreecommitdiffstats
path: root/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js
diff options
context:
space:
mode:
Diffstat (limited to 'polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js')
-rw-r--r--polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js43
1 files changed, 23 insertions, 20 deletions
diff --git a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js
index 4d552f472b..4e9da900ba 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js
+++ b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js
@@ -1,16 +1,19 @@
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/**
+ * @license
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
(function() {
'use strict';
@@ -24,7 +27,7 @@
properties: {
detailType: String,
- projectName: String,
+ repoName: String,
hasNewItemName: {
type: Boolean,
notify: true,
@@ -51,18 +54,18 @@
_computeItemUrl(project) {
if (this.itemDetail === DETAIL_TYPES.branches) {
- return this.getBaseUrl() + '/admin/projects/' +
- this.encodeURL(this.projectName, true) + ',branches';
+ return this.getBaseUrl() + '/admin/repos/' +
+ this.encodeURL(this.repoName, true) + ',branches';
} else if (this.itemDetail === DETAIL_TYPES.tags) {
- return this.getBaseUrl() + '/admin/projects/' +
- this.encodeURL(this.projectName, true) + ',tags';
+ return this.getBaseUrl() + '/admin/repos/' +
+ this.encodeURL(this.repoName, true) + ',tags';
}
},
handleCreateItem() {
const USE_HEAD = this._itemRevision ? this._itemRevision : 'HEAD';
if (this.itemDetail === DETAIL_TYPES.branches) {
- return this.$.restAPI.createProjectBranch(this.projectName,
+ return this.$.restAPI.createRepoBranch(this.repoName,
this._itemName, {revision: USE_HEAD})
.then(itemRegistered => {
if (itemRegistered.status === 201) {
@@ -70,7 +73,7 @@
}
});
} else if (this.itemDetail === DETAIL_TYPES.tags) {
- return this.$.restAPI.createProjectTag(this.projectName,
+ return this.$.restAPI.createRepoTag(this.repoName,
this._itemName,
{revision: USE_HEAD, message: this._itemAnnotation || null})
.then(itemRegistered => {