2607a1db4a
The focus of these changes is to add the following repositories: - Azure\azure-sdk-for-ios - Azure\azure-sdk-for-ios-pr - Azure\azure-sdk-for-android - Azure\azure-sdk-for-android-pr - Azure\azure-sdk-pr The "Stress" label has also been added back into the common set, by agreement in the working group thread. |
||
---|---|---|
.. | ||
ghcreator | ||
repository-snapshots | ||
.gitignore | ||
README.md | ||
common-labels.csv | ||
deploy-labels.ps1 | ||
diff-repo-labels.ps1 | ||
refresh-snapshots.ps1 | ||
repositories.txt | ||
scan-new-labels.ps1 |
README.md
Overview
This area is focused on the management of GitHub labels for the various Azure SDK repositories, containing tools and data used for that purpose.
Prerequisites
-
.NET SDK: In order to run the GHCreator tool, a version of the .NET Core SDK capable of executing an application targeting
netcoreapp3.1
is needed. The latest version of the .NET Core SDK is recommended. -
PowerShell: In order to execute the scripts that perform the automation, PowerShell is needed. The latest version of PowerShell Core is recommended.
-
GitHub personal access token: When run, the GHCreator tool requires a personal access token for GitHub from a user with the ability to manage labels in each of the Azure SDK repositories. Instructions for generating a token can be found in the GitHub Docs article "Creating a personal access token."
Structure
-
root
The root contains the core scripts for managing labels and the set of label data common across repositories. -
repository-snapshots
The container for a snapshot of the labels that exist in each repository; primarily used to help detect and report on new labels that have been added. -
ghcreator
The base container for the .NET Core-based tool used to query label information and perform creation/updates. This is a compiled drop from the GHCreator repository.
Scripts
deploy-labels.ps1
With the default parameter set, this script will deploy set of labels intended to be common across repositories from their definitions in the common-labels.csv
file to the repositories identified by the repositories.txt
file.
# Execute using the default set of label and repository data.
pwsh ./deploy-labels.ps1 << TOKEN >>
# View the help for the full set of parameters.
pwsh -Command "get-help ./deploy-labels.ps1 -full"
diff-repo-labels.ps1
With the default parameter set, this script will query set of labels for the requested repository and compare them against the set of common labels from the common-labels.csv
file. Any labels found in the repository that are not part of the common set will be written as output.
# Execute for the .NET SDK repository using the default set of common label data.
pwsh ./diff-repo-labels.ps1 << TOKEN >> "Azure\azure-sdk-for-net"
# View the help for the full set of parameters.
pwsh -Command "get-help ./diff-repo-labels.ps1 -full"
refresh-shapshots.ps1
With the default parameter set, this script will query set of labels for each of the repositories identified by the repositories.txt
file and save them as individual files in the repository-shapshots
directory.
# Execute using the default set of repository data.
pwsh ./refresh-shapshots.ps1 << TOKEN >>
# View the help for the full set of parameters.
pwsh -Command "get-help ./refresh-shapshots.ps1 -full"
scan-new-labels.ps1
With the default parameter set, this script will query set of labels for each of the repositories identified by the repositories.txt
file and compare them against the latest snapshot from in the repository-shapshots
directory. Any new labels found will be written as output.
# Execute using the default set of repository data.
pwsh ./scan-new-labels.ps1 << TOKEN >>
# View the help for the full set of parameters.
pwsh -Command "get-help ./scan-new-labels.ps1 -full"