1
0
mirror of synced 2025-12-19 09:50:46 -05:00
Files
core/.github/workflows/labeler-train.yml
Jeff Handley 5d3e41fafb Onboard the dotnet/issue-labeler for 'area-' label prediction on issues (#9889)
* [Issue-Labeler] Configure labeler-train.yml

Configure the issue-labeler training workflow.
- Imported the workflow template
- Removed inputs, jobs, and conditions related to pull requests, as we will only use the labeler for issues in this repository

* [Issue-Labeler] Configure labeler-promote.yml

Configure the issue-labeler promotion workflow.
- Imported the workflow template
- Removed input and job for pull requests, as we will only use the labeler for issues in this repository

* [Issue-Labeler] Configure labeler-predict-issues.yml

Configure the issue-labeler issue prediction workflow.
- Imported the workflow template
- Removed the excluded_authors input

* [Issue-Labeler] Configure labeler-cache-retention.yml

Configure the issue-labeler cache retention workflow.
- Imported the workflow template
- Removed config related to pull requests, as we will only use the labeler for issues in this repository

* [Issue-Labeler] Add labeler onboarding/configuration doc

* Bump superlinter to v7 (via SHA) to get type:number support in GitHub workflows

* Address CHECKOV lint errors in GitHub workflows

* Ignore GitHub workflow files from prettier

* Explicitly set workflow permissions

* Comment that UTC is used for cron schedule
2025-06-23 15:00:12 -07:00

93 lines
2.8 KiB
YAML

# Workflow template imported from:
# https://github.com/dotnet/.github/workflow-templates
#
# Train the model for issue label prediction
name: "Labeler: Training"
on:
workflow_dispatch:
inputs:
steps:
description: "Training Steps"
type: choice
required: true
default: "All"
options:
- "All"
- "Download Data"
- "Train Model"
- "Test Model"
limit:
description: "Max number of items to download for training/testing the model (newest items are used). Defaults to the max number of pages times the page size."
type: number
page_size:
description: "Number of items per page in GitHub API requests. Defaults to 100."
type: number
page_limit:
description: "Maximum number of pages to download for training/testing the model. Defaults to 1000."
type: number
cache_key_suffix:
description: "The cache key suffix to use for staged data/models (use 'ACTIVE' to bypass staging). Defaults to 'staged'."
required: true
default: "staged"
env:
CACHE_KEY: ${{ inputs.cache_key_suffix }}
REPOSITORY: ${{ github.repository }}
LABEL_PREFIX: "area-"
THRESHOLD: "0.40"
LIMIT: ${{ inputs.limit }}
PAGE_SIZE: ${{ inputs.page_size }}
PAGE_LIMIT: ${{ inputs.page_limit }}
permissions:
issues: read
jobs:
download-issues:
runs-on: ubuntu-latest
steps:
- name: "Download Issues"
uses: dotnet/issue-labeler/download@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
cache_key: ${{ env.CACHE_KEY }}
repository: ${{ env.REPOSITORY }}
label_prefix: ${{ env.LABEL_PREFIX }}
limit: ${{ env.LIMIT }}
page_size: ${{ env.PAGE_SIZE }}
page_limit: ${{ env.PAGE_LIMIT }}
env:
GITHUB_TOKEN: ${{ github.token }}
train-issues:
runs-on: ubuntu-latest
permissions: {}
needs: download-issues
steps:
- name: "Train Model for Issues"
uses: dotnet/issue-labeler/train@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
data_cache_key: ${{ env.CACHE_KEY }}
model_cache_key: ${{ env.CACHE_KEY }}
test-issues:
runs-on: ubuntu-latest
needs: train-issues
steps:
- name: "Test Model for Issues"
uses: dotnet/issue-labeler/test@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
cache_key: ${{ env.CACHE_KEY }}
repository: ${{ env.REPOSITORY }}
label_prefix: ${{ env.LABEL_PREFIX }}
threshold: ${{ env.THRESHOLD }}
limit: ${{ env.LIMIT }}
page_size: ${{ env.PAGE_SIZE }}
page_limit: ${{ env.PAGE_LIMIT }}
env:
GITHUB_TOKEN: ${{ github.token }}