Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/labeler-cache-retention.yml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/labeler-predict-issues.yml
Original file line number Diff line number Diff line change
@@ -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)"

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/labeler-predict-pulls.yml
Original file line number Diff line number Diff line change
@@ -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)"

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/labeler-promote.yml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/labeler-train.yml
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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"
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/labeler.md
Original file line number Diff line number Diff line change
@@ -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