diff --git a/.github/workflows/labeler-cache-retention.yml b/.github/workflows/labeler-cache-retention.yml index 53a08a6..2ecca6c 100644 --- a/.github/workflows/labeler-cache-retention.yml +++ b/.github/workflows/labeler-cache-retention.yml @@ -1,3 +1,8 @@ +# Workflow template imported and updated from: +# https://github.com/dotnet/issue-labeler/wiki/Onboarding +# +# See labeler.md for more information +# # Regularly restore the prediction models from cache to prevent cache eviction name: "Labeler: Cache Retention" @@ -26,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - type: ["issues", "pulls"] + type: ["issues"] # Pulls are disabled in this repository, so "pulls" is removed from the matrix steps: - uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 with: diff --git a/.github/workflows/labeler-predict-issues.yml b/.github/workflows/labeler-predict-issues.yml index 44568a1..0ef3b2a 100644 --- a/.github/workflows/labeler-predict-issues.yml +++ b/.github/workflows/labeler-predict-issues.yml @@ -1,3 +1,8 @@ +# Workflow template imported and updated from: +# https://github.com/dotnet/issue-labeler/wiki/Onboarding +# +# See labeler.md for more information +# # Predict labels for Issues using a trained model name: "Labeler: Predict (Issues)" diff --git a/.github/workflows/labeler-predict-pulls.yml b/.github/workflows/labeler-predict-pulls.yml index 2ccf097..b886e96 100644 --- a/.github/workflows/labeler-predict-pulls.yml +++ b/.github/workflows/labeler-predict-pulls.yml @@ -1,3 +1,8 @@ +# Workflow template imported and updated from: +# https://github.com/dotnet/issue-labeler/wiki/Onboarding +# +# See labeler.md for more information +# # Predict labels for Pull Requests using a trained model name: "Labeler: Predict (Pulls)" diff --git a/.github/workflows/labeler-promote.yml b/.github/workflows/labeler-promote.yml index f5208c5..c01086c 100644 --- a/.github/workflows/labeler-promote.yml +++ b/.github/workflows/labeler-promote.yml @@ -1,3 +1,8 @@ +# Workflow template imported and updated from: +# https://github.com/dotnet/issue-labeler/wiki/Onboarding +# +# See labeler.md for more information +# # Promote a model from staging to 'ACTIVE', backing up the currently 'ACTIVE' model name: "Labeler: Promotion" diff --git a/.github/workflows/labeler-train.yml b/.github/workflows/labeler-train.yml index c220124..266deb0 100644 --- a/.github/workflows/labeler-train.yml +++ b/.github/workflows/labeler-train.yml @@ -1,3 +1,8 @@ +# Workflow template imported and updated from: +# https://github.com/dotnet/issue-labeler/wiki/Onboarding +# +# See labeler.md for more information +# # Train the Issues and Pull Requests models for label prediction name: "Labeler: Training" @@ -8,7 +13,7 @@ on: description: "Issues or Pull Requests" type: choice required: true - default: "Both" + default: "Issues" # Pulls are disabled in this repository, so default to "Issues" only options: - "Both" - "Issues" diff --git a/.github/workflows/labeler.md b/.github/workflows/labeler.md new file mode 100644 index 0000000..5db99ee --- /dev/null +++ b/.github/workflows/labeler.md @@ -0,0 +1,38 @@ +# Issue-Labeler Workflows + +This repository uses actions from [dotnet/issue-labeler](https://github.com/dotnet/issue-labeler) to predict area labels for issues and pull requests. + +The following workflow templates were imported and updated from [dotnet/issue-labeler/wiki/Onboarding](https://github.com/dotnet/issue-labeler/wiki/Onboarding): + +1. `labeler-cache-retention.yml` +2. `labeler-predict-issues.yml` +3. `labeler-predict-pulls.yml` +4. `labeler-promote.yml` +5. `labeler-train.yml` + +## Repository Configuration + +Across these workflows, the following changes were made to configure the issue labeler for this repository: + +1. Update the `github.repository_owner` checks that prevent workflow runs outside 'microsoft' + - `labeler-cache-retention.yml` + - `labeler-predict-issues.yml` + - `labeler-predict-pulls.yml` +2. Set `LABEL_PREFIX` to `"area-"`: + - `labeler-predict-issues.yml` + - `labeler-predict-pulls.yml` + - `labeler-train.yml` +3. Remove the `DEFAULT_LABEL` setting since no default label is applied when prediction is not made: + - `labeler-predict-issues.yml` + - `labeler-predict-pulls.yml` +4. Remove the `EXCLUDED_AUTHORS` value as we do not bypass labeling for any authors' issues/pulls in this repository: + - `labeler-predict-issues.yml` + - `labeler-predict-pulls.yml` +5. Remove the `repository` input for training the models against another repository: + - `labeler-train.yml` +6. Update the cache retention cron schedule to an arbitrary time of day: + - `labeler-cache-retention.yml` +7. Disable pull request training, cache retention, and predition + - `labeler-train.yml` - Change the default from "Both" to "Issues" + - `labeler-cache-retention.yml` - Remove "pulls" from the job matrix (leaving a comment) + - `labeler-predict-pulls.yml` - Workflow marked as Disabled via GitHub UI