Skip to content

Commit

Permalink
Add Git fork support (#157)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
igoravl authored Feb 11, 2022
1 parent 428cbec commit 4868f14
Show file tree
Hide file tree
Showing 24 changed files with 606 additions and 388 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ jobs:
| Where-Object { ($_.Draft -eq $true) -and ($_.Name -eq "Release $($env:BUILD_NAME)") }
Set-GitHubRelease -Release $rel.id -Draft:$false
Write-Output "::set-output name=RELEASE_URL::$($rel.html_url)"
Write-Output "::set-output name=RELEASE_TAG::$($env:BUILD_NAME.Replace('+', '%2B'))"
outputs:
BUILD_NAME: ${{ needs.Staging.outputs.BUILD_NAME }}
RELEASE_NOTES: ${{ needs.Staging.outputs.RELEASE_NOTES }}
RELEASE_URL: ${{ steps.promote_release.outputs.RELEASE_URL }}
RELEASE_TAG: ${{ steps.promote_release.outputs.RELEASE_TAG }}

Site:

Expand Down Expand Up @@ -328,10 +330,12 @@ jobs:
id: tweet
uses: snow-actions/[email protected]
env:
BUILD_NAME: ${{ needs.Build.outputs.BUILD_NAME }}
CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
CONSUMER_API_SECRET_KEY: ${{ secrets.TWITTER_CONSUMER_API_SECRET_KEY }}
ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
RELEASE_TAG: ${{ needs.Release.outputs.RELEASE_TAG }}
with:
status: |
TfsCmdlets version {{ env.BUILD_NAME }} has just been released. Check it out! ${{ needs.Release.outputs.RELEASE_URL }}
TfsCmdlets version ${{ env.BUILD_NAME }} has just been released. Check it out! https://github.com/igoravl/TfsCmdlets/releases/tag/v${{ env.RELEASE_TAG }}
22 changes: 21 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,25 @@
".idea": true
},
"search.usePCRE2": true,
"csharp.suppressDotnetRestoreNotification": true
"csharp.suppressDotnetRestoreNotification": true,
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#6800b5",
"activityBar.activeBorder": "#000000",
"activityBar.background": "#6800b5",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#000000",
"activityBarBadge.foreground": "#e7e7e7",
"sash.hoverBorder": "#6800b5",
"statusBar.background": "#4b0082",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#6800b5",
"statusBarItem.remoteBackground": "#4b0082",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#4b0082",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#4b008299",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "Indigo"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco
bool includeTrailingSeparator = false, bool includeTeamProject = false, char separator = '\\')
{
if (path == null) throw new ArgumentNullException("path");
if (projectName == null) throw new ArgumentNullException("projectName");
//if (projectName == null) throw new ArgumentNullException("projectName");
if (includeTeamProject && string.IsNullOrEmpty(projectName)) throw new ArgumentNullException("projectName");
if (includeScope && string.IsNullOrEmpty(scope)) throw new ArgumentNullException("scope");
if (excludePath && !includeScope && !includeTeamProject) throw new ArgumentException("excludePath is only valid when either includeScope or includeTeamProject are true");
Expand All @@ -29,7 +29,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco

if (!excludePath)
{
if (path.Equals(projectName) || path.StartsWith($"{projectName}{separator}"))
if (path.Equals(projectName) || path.StartsWith($@"{projectName}{separator}"))
{
if (Regex.IsMatch(path, $@"^{projectName}\{separator}{scope}\{separator}"))
{
Expand All @@ -46,7 +46,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco
}
else if (path.Equals(scope) || path.StartsWith($"{scope}{separator}"))
{
if (Regex.IsMatch(path, $@"^{scope}{separator}"))
if (Regex.IsMatch(path, $@"^{scope}\{separator}"))
{
path = path.Substring(path.IndexOf(separator) + 1);
}
Expand All @@ -63,7 +63,7 @@ public string NormalizeNodePath(string path, string projectName = "", string sco
{
newPath.Append(separator);
}
else if (!includeTrailingSeparator && newPath.Length > 0 && newPath[newPath.Length - 1].Equals(separator))
else if (!includeTrailingSeparator && newPath.Length > 1 && newPath[newPath.Length - 1].Equals(separator))
{
newPath.Remove(newPath.Length - 1, 1);
}
Expand Down
Loading

0 comments on commit 4868f14

Please sign in to comment.