Skip to content

Commit

Permalink
Merge pull request onlyutkarsh#9 from onlyutkarsh/hotfix/issue-2
Browse files Browse the repository at this point in the history
fetch repos based on membership not as owner
  • Loading branch information
onlyutkarsh authored Feb 24, 2019
2 parents b04b9ed + 20646d5 commit 28effdc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
9 changes: 6 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,15 @@ Click `Add` and select the created GitLab service connection. Once you do that,

## Changes

> - #{Release.ReleaseName}#
> - v#{Release.ReleaseName}#
> - Fix [issue 2](https://github.com/onlyutkarsh/gitlab-integration/issues/2) where only user owned repos were fetched rather than membership
> - v1.0.5
> - Fix [issue 8](https://github.com/onlyutkarsh/gitlab-integration/issues/8) where on-premises URL configured in the endpoint was not considered
> - Merge [PR #6](https://github.com/onlyutkarsh/gitlab-integration/pull/6)
> - Merge pull request [#6](https://github.com/onlyutkarsh/gitlab-integration/pull/6)
> - Other minor fixes
> - 1.0.0
> - v1.0.0
> - Initial release
> _For more details please see GitHub [releases](https://github.com/onlyutkarsh/gitlab-integration/releases)_
## Feedback

Expand Down
9 changes: 4 additions & 5 deletions scripts/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ function updateTaskJson(taskJsons: string[]) {
let taskJson = require(taskFilePath);
let tempTaskId = taskJson.id;
let tempHelpMarkdown = taskJson.helpMarkDown;
let tempFriendlyName = taskJson.friendlyName.replace(/\(beta\)/g, "").trim();
let tempFriendlyName = taskJson.friendlyName.replace(/\(Dev:\)/g, "").trim();
let tempTaskVersion = semver.valid(`${taskJson.version["Major"]}.${taskJson.version["Minor"]}.${taskJson.version["Patch"]}`);
let newTaskVersion = semver.inc(tempTaskVersion, "patch");
let betaTaskPatch: jsonPatch.Operation[] = [
{ op: "replace", path: "/version/Major", value: semver.major(newTaskVersion) },
{ op: "replace", path: "/version/Minor", value: semver.minor(newTaskVersion) },
{ op: "replace", path: "/version/Patch", value: semver.patch(newTaskVersion) },
{ op: "replace", path: "/helpMarkDown", value: newTaskVersion },
{ op: "replace", path: "/helpMarkDown", value: "Dev - v" + newTaskVersion }
];
if (argv.beta) {
console.log(chalk.yellow("Applying task id for BETA testing"));
betaTaskPatch.push({ op: "replace", path: "/id", value: taskids.betaId }, { op: "replace", path: "/friendlyName", value: tempFriendlyName + " (beta)" });
console.log(chalk.yellow("Applying task id for DEV testing"));
betaTaskPatch.push({ op: "replace", path: "/id", value: taskids.betaId }, { op: "replace", path: "/friendlyName", value: "Dev: " + tempFriendlyName });
}
else {
console.log(chalk.yellow("Applying task id for PROD"));
Expand All @@ -115,7 +115,6 @@ function updateTaskJson(taskJsons: string[]) {
console.log("Updated task.json in dist folder");
// revert to the old task name
patchedJson.id = taskids.id;
patchedJson.name = tempFriendlyName;
patchedJson.helpMarkDown = tempHelpMarkdown;
patchedJson.friendlyName = tempFriendlyName;
let parsedPath = taskFilePath.replace("dist\\", "");
Expand Down
4 changes: 2 additions & 2 deletions tasks/DownloadRepo/DownloadRepoV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "e6590a51-c3b6-4b88-99e4-b3498ed7cd5b",
"name": "downloadgitlabrepository",
"friendlyName": "Download GitLab repository",
"description": "Download your GitLab repository using 'clone' command in your build/release definition.",
"description": "Download your GitLab repository using 'clone' command in your build/release pipeline.",
"author": "Utkarsh Shigihalli",
"helpMarkDown": "[More Information](https://marketplace.visualstudio.com/items?itemName=onlyutkarsh.gitlab-integration)",
"category": "Utility",
Expand All @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 1
"Patch": 3
},
"minimumAgentVersion": "2.115.0",
"instanceNameFormat": "Download GitLab repository",
Expand Down
6 changes: 3 additions & 3 deletions vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"id": "gitlab-integration",
"name": "GitLab Integration for Azure Pipelines",
"publisher": "onlyutkarsh",
"version": "0.0.166",
"version": "0.0.168",
"public": false,
"description": "Download sources from GitLab repository in your build definition or consume them as an artifact in to your release definition during deployment.",
"description": "Download sources from GitLab repository in your build pipeline or consume them as an artifact in to your release pipeline during deployment.",
"categories": [
"Azure Pipelines"
],
Expand Down Expand Up @@ -102,7 +102,7 @@
},
{
"name": "Repositories",
"endpointUrl": "{{{endpoint.url}}}api/v4/projects?owned=true",
"endpointUrl": "{{{endpoint.url}}}api/v4/projects?membership=true",
"resultSelector": "jsonpath:$[*]"
},
{
Expand Down

0 comments on commit 28effdc

Please sign in to comment.