Skip to content

Commit 4868f14

Browse files
authored
Add Git fork support (#157)
* Fix Twitter announcement * Update README * Add support for forks * Update release notes * Refactor NewWorkItem * Fix bug in winget manifest gen * Fix rename iteration * Improve ClassificationNode display * Add Peacock settings * Fixes #160 * Fixes #158 and #159 * Fixes missing Force attribute * Update release notes * Update old release notes * Add fork info to table format
1 parent 428cbec commit 4868f14

24 files changed

+606
-388
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,12 @@ jobs:
160160
| Where-Object { ($_.Draft -eq $true) -and ($_.Name -eq "Release $($env:BUILD_NAME)") }
161161
Set-GitHubRelease -Release $rel.id -Draft:$false
162162
Write-Output "::set-output name=RELEASE_URL::$($rel.html_url)"
163+
Write-Output "::set-output name=RELEASE_TAG::$($env:BUILD_NAME.Replace('+', '%2B'))"
163164
outputs:
164165
BUILD_NAME: ${{ needs.Staging.outputs.BUILD_NAME }}
165166
RELEASE_NOTES: ${{ needs.Staging.outputs.RELEASE_NOTES }}
166167
RELEASE_URL: ${{ steps.promote_release.outputs.RELEASE_URL }}
168+
RELEASE_TAG: ${{ steps.promote_release.outputs.RELEASE_TAG }}
167169

168170
Site:
169171

@@ -328,10 +330,12 @@ jobs:
328330
id: tweet
329331
uses: snow-actions/[email protected]
330332
env:
333+
BUILD_NAME: ${{ needs.Build.outputs.BUILD_NAME }}
331334
CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
332335
CONSUMER_API_SECRET_KEY: ${{ secrets.TWITTER_CONSUMER_API_SECRET_KEY }}
333336
ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
334337
ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
338+
RELEASE_TAG: ${{ needs.Release.outputs.RELEASE_TAG }}
335339
with:
336340
status: |
337-
TfsCmdlets version {{ env.BUILD_NAME }} has just been released. Check it out! ${{ needs.Release.outputs.RELEASE_URL }}
341+
TfsCmdlets version ${{ env.BUILD_NAME }} has just been released. Check it out! https://github.com/igoravl/TfsCmdlets/releases/tag/v${{ env.RELEASE_TAG }}

.vscode/settings.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,25 @@
2020
".idea": true
2121
},
2222
"search.usePCRE2": true,
23-
"csharp.suppressDotnetRestoreNotification": true
23+
"csharp.suppressDotnetRestoreNotification": true,
24+
"workbench.colorCustomizations": {
25+
"activityBar.activeBackground": "#6800b5",
26+
"activityBar.activeBorder": "#000000",
27+
"activityBar.background": "#6800b5",
28+
"activityBar.foreground": "#e7e7e7",
29+
"activityBar.inactiveForeground": "#e7e7e799",
30+
"activityBarBadge.background": "#000000",
31+
"activityBarBadge.foreground": "#e7e7e7",
32+
"sash.hoverBorder": "#6800b5",
33+
"statusBar.background": "#4b0082",
34+
"statusBar.foreground": "#e7e7e7",
35+
"statusBarItem.hoverBackground": "#6800b5",
36+
"statusBarItem.remoteBackground": "#4b0082",
37+
"statusBarItem.remoteForeground": "#e7e7e7",
38+
"titleBar.activeBackground": "#4b0082",
39+
"titleBar.activeForeground": "#e7e7e7",
40+
"titleBar.inactiveBackground": "#4b008299",
41+
"titleBar.inactiveForeground": "#e7e7e799"
42+
},
43+
"peacock.color": "Indigo"
2444
}

CSharp/TfsCmdlets.Common/Services/Impl/NodeUtil.cs renamed to CSharp/TfsCmdlets.Common/Services/Impl/NodeUtilImpl.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco
1010
bool includeTrailingSeparator = false, bool includeTeamProject = false, char separator = '\\')
1111
{
1212
if (path == null) throw new ArgumentNullException("path");
13-
if (projectName == null) throw new ArgumentNullException("projectName");
13+
//if (projectName == null) throw new ArgumentNullException("projectName");
1414
if (includeTeamProject && string.IsNullOrEmpty(projectName)) throw new ArgumentNullException("projectName");
1515
if (includeScope && string.IsNullOrEmpty(scope)) throw new ArgumentNullException("scope");
1616
if (excludePath && !includeScope && !includeTeamProject) throw new ArgumentException("excludePath is only valid when either includeScope or includeTeamProject are true");
@@ -29,7 +29,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco
2929

3030
if (!excludePath)
3131
{
32-
if (path.Equals(projectName) || path.StartsWith($"{projectName}{separator}"))
32+
if (path.Equals(projectName) || path.StartsWith($@"{projectName}{separator}"))
3333
{
3434
if (Regex.IsMatch(path, $@"^{projectName}\{separator}{scope}\{separator}"))
3535
{
@@ -46,7 +46,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco
4646
}
4747
else if (path.Equals(scope) || path.StartsWith($"{scope}{separator}"))
4848
{
49-
if (Regex.IsMatch(path, $@"^{scope}{separator}"))
49+
if (Regex.IsMatch(path, $@"^{scope}\{separator}"))
5050
{
5151
path = path.Substring(path.IndexOf(separator) + 1);
5252
}
@@ -63,7 +63,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco
6363
{
6464
newPath.Append(separator);
6565
}
66-
else if (!includeTrailingSeparator && newPath.Length > 0 && newPath[newPath.Length - 1].Equals(separator))
66+
else if (!includeTrailingSeparator && newPath.Length > 1 && newPath[newPath.Length - 1].Equals(separator))
6767
{
6868
newPath.Remove(newPath.Length - 1, 1);
6969
}

0 commit comments

Comments
 (0)