From c1b54e28b4fe49ad7e0ca64bdc2cb7d72d322330 Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Thu, 1 May 2025 23:21:29 -0700 Subject: [PATCH 1/2] Import v2.0.0 issue-labeler default workflows --- .github/workflows/labeler-build-predictor.yml | 17 -- .github/workflows/labeler-cache-retention.yml | 32 ++- .github/workflows/labeler-predict-issues.yml | 63 +++-- .github/workflows/labeler-predict-pulls.yml | 65 +++-- .github/workflows/labeler-promote.yml | 53 ++-- .github/workflows/labeler-train.yml | 260 ++++++++++-------- 6 files changed, 289 insertions(+), 201 deletions(-) delete mode 100644 .github/workflows/labeler-build-predictor.yml diff --git a/.github/workflows/labeler-build-predictor.yml b/.github/workflows/labeler-build-predictor.yml deleted file mode 100644 index 8a12b312db0..00000000000 --- a/.github/workflows/labeler-build-predictor.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Labeler: Build Predictor App" - -on: - # Allow dispatching the workflow via the Actions UI - workflow_dispatch: - inputs: - rebuild: - description: "Force a rebuild of the app" - type: boolean - -jobs: - build-predictor: - permissions: - actions: write - uses: dotnet/issue-labeler/.github/workflows/build-predictor.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - rebuild: ${{ inputs.rebuild }} diff --git a/.github/workflows/labeler-cache-retention.yml b/.github/workflows/labeler-cache-retention.yml index c6914710cac..e982e7e2bfc 100644 --- a/.github/workflows/labeler-cache-retention.yml +++ b/.github/workflows/labeler-cache-retention.yml @@ -1,13 +1,35 @@ +# Regularly restore the prediction models from cache to prevent cache eviction name: "Labeler: Cache Retention" +# For more information about GitHub's action cache limits and eviction policy, see: +# https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy + on: schedule: - - cron: "13 6 * * *" # 6:13 every day (arbitrary time daily) + - cron: "42 18 * * *" # 18:42 every day (arbitrary time daily) workflow_dispatch: + inputs: + cache_key: + description: "The cache key suffix to use for restoring the model from cache. Defaults to 'ACTIVE'." + required: true + default: "ACTIVE" + +env: + CACHE_KEY: ${{ inputs.cache_key || 'ACTIVE' }} jobs: - cache-retention: - # Do not run the workflow on forks outside the 'dotnet' org - if: ${{ github.repository_owner == 'dotnet' }} - uses: dotnet/issue-labeler/.github/workflows/cache-retention.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 + restore-cache: + # Do not automatically run the workflow on forks outside the 'dotnet' org + if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + type: ["issues", "pulls"] + steps: + - uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: ${{ matrix.type }} + cache_key: ${{ env.CACHE_KEY }} + fail-on-cache-miss: true diff --git a/.github/workflows/labeler-predict-issues.yml b/.github/workflows/labeler-predict-issues.yml index f1783e7340c..e2447a37c7b 100644 --- a/.github/workflows/labeler-predict-issues.yml +++ b/.github/workflows/labeler-predict-issues.yml @@ -1,32 +1,57 @@ -name: "Labeler: Predict Issue Labels" +# Predict labels for Issues using a trained model +name: "Labeler: Predict (Issues)" on: - # Only automatically predict area labels when issues are originally opened + # Only automatically predict area labels when issues are first opened issues: types: opened # Allow dispatching the workflow via the Actions UI, specifying ranges of numbers workflow_dispatch: inputs: - issue_numbers: - description: "Issue Numbers (comma-separated list of ranges)" - type: string - model_cache_key: - description: "The cache key suffix to use for loading the model" - type: string + issues: + description: "Issue Numbers (comma-separated list of ranges)." required: true - default: "LIVE" + cache_key: + description: "The cache key suffix to use for restoring the model. Defaults to 'ACTIVE'." + required: true + default: "ACTIVE" + +env: + # Do not allow failure for jobs triggered automatically (as this causes red noise on the workflows list) + ALLOW_FAILURE: ${{ github.event_name == 'workflow_dispatch' }} + + LABEL_PREFIX: "area-" + THRESHOLD: 0.40 + DEFAULT_LABEL: "needs-area-label" + EXCLUDED_AUTHORS: "" # Comma-separated list of authors to exclude from training data jobs: - predict-issues: - # Do not run the workflow on forks outside the 'dotnet' org - if: ${{ github.repository_owner == 'dotnet' && (inputs.issue_numbers || github.event.issue.number) }} + predict-issue-label: + # Do not automatically run the workflow on forks outside the 'dotnet' org + if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' }} + runs-on: ubuntu-latest permissions: issues: write - uses: dotnet/issue-labeler/.github/workflows/predict-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - model_cache_key: ${{ inputs.model_cache_key }} - issue_numbers: ${{ inputs.issue_numbers || github.event.issue.number }} - label_prefix: "area-" - threshold: 0.40 - default_label: "needs-area-label" + steps: + - name: "Restore issues model from cache" + id: restore-model + uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: issues + fail-on-cache-miss: ${{ env.ALLOW_FAILURE }} + quiet: true + + - name: "Predict issue labels" + id: prediction + if: ${{ steps.restore-model.outputs.cache-hit == 'true' }} + uses: dotnet/issue-labeler/predict@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + issues: ${{ inputs.issues || github.event.issue.number }} + label_prefix: ${{ env.LABEL_PREFIX }} + threshold: ${{ env.THRESHOLD }} + default_label: ${{ env.DEFAULT_LABEL }} + excluded_authors: ${{ env.EXCLUDED_AUTHORS }} + env: + GITHUB_TOKEN: ${{ github.token }} + continue-on-error: ${{ !env.ALLOW_FAILURE }} diff --git a/.github/workflows/labeler-predict-pulls.yml b/.github/workflows/labeler-predict-pulls.yml index 4f00854d5df..fca558fa18e 100644 --- a/.github/workflows/labeler-predict-pulls.yml +++ b/.github/workflows/labeler-predict-pulls.yml @@ -1,4 +1,5 @@ -name: "Labeler: Predict Pull Labels" +# Predict labels for Pull Requests using a trained model +name: "Labeler: Predict (Pulls)" on: # Per to the following documentation: @@ -13,31 +14,57 @@ on: # Only automatically predict area labels when pull requests are first opened pull_request_target: types: opened + + # Configure the branches that need to have PRs labeled branches: - - 'main' + - main # Allow dispatching the workflow via the Actions UI, specifying ranges of numbers workflow_dispatch: inputs: - pull_numbers: - description: "Pull Numbers (comma-separated list of ranges)" - type: string - model_cache_key: - description: "The cache key suffix to use for loading the model" - type: string + pulls: + description: "Pull Request Numbers (comma-separated list of ranges)." + required: true + cache_key: + description: "The cache key suffix to use for restoring the model. Defaults to 'ACTIVE'." required: true - default: "LIVE" + default: "ACTIVE" + +env: + # Do not allow failure for jobs triggered automatically (this can block PR merge) + ALLOW_FAILURE: ${{ github.event_name == 'workflow_dispatch' }} + + LABEL_PREFIX: "area-" + THRESHOLD: 0.40 + DEFAULT_LABEL: "needs-area-label" + EXCLUDED_AUTHORS: "" # Comma-separated list of authors to exclude from training data jobs: - predict-pulls: - # Do not run the workflow on forks outside the 'dotnet' org - if: ${{ github.repository_owner == 'dotnet' && (inputs.pull_numbers || github.event.number) }} + predict-pull-label: + # Do not automatically run the workflow on forks outside the 'dotnet' org + if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' }} + runs-on: ubuntu-latest permissions: pull-requests: write - uses: dotnet/issue-labeler/.github/workflows/predict-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - model_cache_key: ${{ inputs.model_cache_key }} - pull_numbers: ${{ inputs.pull_numbers || github.event.number }} - label_prefix: "area-" - threshold: 0.40 - default_label: "needs-area-label" + steps: + - name: "Restore pulls model from cache" + id: restore-model + uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: pulls + fail-on-cache-miss: ${{ env.ALLOW_FAILURE }} + quiet: true + + - name: "Predict pull labels" + id: prediction + if: ${{ steps.restore-model.outputs.cache-hit == 'true' }} + uses: dotnet/issue-labeler/predict@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + pulls: ${{ inputs.pulls || github.event.number }} + label_prefix: ${{ env.LABEL_PREFIX }} + threshold: ${{ env.THRESHOLD }} + default_label: ${{ env.DEFAULT_LABEL }} + excluded_authors: ${{ env.EXCLUDED_AUTHORS }} + env: + GITHUB_TOKEN: ${{ github.token }} + continue-on-error: ${{ !env.ALLOW_FAILURE }} diff --git a/.github/workflows/labeler-promote.yml b/.github/workflows/labeler-promote.yml index 97f40afa8f1..f5208c5191f 100644 --- a/.github/workflows/labeler-promote.yml +++ b/.github/workflows/labeler-promote.yml @@ -1,42 +1,49 @@ -name: "Labeler: Promote Models" +# Promote a model from staging to 'ACTIVE', backing up the currently 'ACTIVE' model +name: "Labeler: Promotion" on: # Dispatched via the Actions UI, promotes the staged models from - # a staging slot into the prediction environment + # a staged slot into the prediction environment workflow_dispatch: inputs: - promote_issues: + issues: description: "Issues: Promote Model" type: boolean required: true - promote_pulls: + pulls: description: "Pulls: Promote Model" type: boolean required: true - model_cache_key: - description: "The cache key suffix to promote into the 'LIVE' cache" - type: string + staged_key: + description: "The cache key suffix to use for promoting a staged model to 'ACTIVE'. Defaults to 'staged'." required: true - default: "staging" - backup_cache_key: - description: "The cache key suffix to use for backing up the currently promoted model" - type: string + default: "staged" + backup_key: + description: "The cache key suffix to use for backing up the currently active model. Defaults to 'backup'." default: "backup" permissions: actions: write jobs: - labeler-promote-issues: - if: ${{ inputs.promote_issues }} - uses: dotnet/issue-labeler/.github/workflows/promote-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - model_cache_key: ${{ inputs.model_cache_key }} - backup_cache_key: ${{ inputs.backup_cache_key }} + promote-issues: + if: ${{ inputs.issues }} + runs-on: ubuntu-latest + steps: + - name: "Promote Model for Issues" + uses: dotnet/issue-labeler/promote@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: "issues" + staged_key: ${{ inputs.staged_key }} + backup_key: ${{ inputs.backup_key }} - labeler-promote-pulls: - if: ${{ inputs.promote_pulls }} - uses: dotnet/issue-labeler/.github/workflows/promote-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - model_cache_key: ${{ inputs.model_cache_key }} - backup_cache_key: ${{ inputs.backup_cache_key }} + promote-pulls: + if: ${{ inputs.pulls }} + runs-on: ubuntu-latest + steps: + - name: "Promote Model for Pull Requests" + uses: dotnet/issue-labeler/promote@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: "pulls" + staged_key: ${{ inputs.staged_key }} + backup_key: ${{ inputs.backup_key }} diff --git a/.github/workflows/labeler-train.yml b/.github/workflows/labeler-train.yml index 2acfe17fe9c..a8d5a841a4f 100644 --- a/.github/workflows/labeler-train.yml +++ b/.github/workflows/labeler-train.yml @@ -1,139 +1,163 @@ -name: "Labeler: Train Models" +# Train the Issues and Pull Requests models for label prediction +name: "Labeler: Training" on: - # Dispatched via the Actions UI, stages new models for promotion consideration - # Each step of the workflow can be run independently: Download, Train, and Test workflow_dispatch: inputs: - download_issues: - description: "Issues: Download Data" - type: boolean - default: true - train_issues: - description: "Issues: Train Model" - type: boolean - default: true - test_issues: - description: "Issues: Test Model" - type: boolean - default: true - download_pulls: - description: "Pulls: Download Data" - type: boolean - default: true - train_pulls: - description: "Pulls: Train Model" - type: boolean - default: true - test_pulls: - description: "Pulls: Test Model" - type: boolean - default: true + type: + description: "Issues or Pull Requests" + type: choice + required: true + default: "Both" + options: + - "Both" + - "Issues" + - "Pull Requests" - data_limit: - description: "Max number of items to include in the model" - type: number + steps: + description: "Training Steps" + type: choice + required: true + default: "All" + options: + - "All" + - "Download Data" + - "Train Model" + - "Test Model" - pull_page_size: - description: "Max number of pulls to download per page" + repository: + description: "The org/repo to download data from. Defaults to the current repository." + 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 for issues, 25 for pull requests." + type: number + page_limit: + description: "Maximum number of pages to download for training/testing the model. Defaults to 1000 for issues, 4000 for pull requests." type: number - default: 1 - cache_key_suffix: - description: "The cache key suffix to use for staging data/models (use 'LIVE' to bypass staging)" - type: string + description: "The cache key suffix to use for staged data/models (use 'ACTIVE' to bypass staging). Defaults to 'staged'." required: true - default: "staging" + default: "staged" -permissions: - issues: read - pull-requests: read - actions: write +env: + CACHE_KEY: ${{ inputs.cache_key_suffix }} + REPOSITORY: ${{ inputs.repository || github.repository }} + LABEL_PREFIX: "area-" + THRESHOLD: "0.40" + LIMIT: ${{ inputs.limit }} + PAGE_SIZE: ${{ inputs.page_size }} + PAGE_LIMIT: ${{ inputs.page_limit }} + EXCLUDED_AUTHORS: "" # Comma-separated list of authors to exclude from training data jobs: - # Without specifying a pageSize of 1 for downloading pull requests, the requests time out - # Directly invoking the individual workflows until https://github.com/dotnet/issue-labeler/issues/97 is addressed - # - # labeler-train: - # permissions: - # issues: read - # pull-requests: read - # actions: write - # uses: dotnet/issue-labeler/.github/workflows/train.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - # with: - # download_issues: ${{ inputs.download_issues }} - # train_issues: ${{ inputs.train_issues }} - # test_issues: ${{ inputs.test_issues }} - # download_pulls: ${{ inputs.download_pulls }} - # train_pulls: ${{ inputs.train_pulls }} - # test_pulls: ${{ inputs.test_pulls }} - # data_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} - # cache_key_suffix: ${{ inputs.cache_key_suffix }} - # label_prefix: "area-" - # threshold: 0.40 - - build-predictor: - uses: dotnet/issue-labeler/.github/workflows/build-predictor.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - - labeler-download-issues: - needs: build-predictor - if: ${{ inputs.download_issues }} + download-issues: + if: ${{ contains(fromJSON('["Both", "Issues"]'), inputs.type) && contains(fromJSON('["All", "Download Data"]'), inputs.steps) }} + runs-on: ubuntu-latest permissions: issues: read - actions: write - uses: dotnet/issue-labeler/.github/workflows/download-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - data_cache_key: ${{ inputs.cache_key_suffix }} - issue_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} - label_prefix: "area-" + 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 }} + excluded_authors: ${{ env.EXCLUDED_AUTHORS }} + env: + GITHUB_TOKEN: ${{ github.token }} - labeler-train-issues: - needs: labeler-download-issues - if: ${{ inputs.train_issues && always() && (needs.labeler-download-issues.result == 'success' || needs.labeler-download-issues.result == 'skipped') }} + download-pulls: + if: ${{ contains(fromJSON('["Both", "Pull Requests"]'), inputs.type) && contains(fromJSON('["All", "Download Data"]'), inputs.steps) }} + runs-on: ubuntu-latest permissions: - actions: write - uses: dotnet/issue-labeler/.github/workflows/train-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - data_cache_key: ${{ inputs.cache_key_suffix }} - model_cache_key: ${{ inputs.cache_key_suffix }} + pull-requests: read + steps: + - name: "Download Pull Requests" + uses: dotnet/issue-labeler/download@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: "pulls" + 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 }} + excluded_authors: ${{ env.EXCLUDED_AUTHORS }} + env: + GITHUB_TOKEN: ${{ github.token }} - labeler-test-issues: - needs: [labeler-download-issues, labeler-train-issues] - if: ${{ inputs.test_issues && always() && (needs.labeler-download-issues.result == 'success' || needs.labeler-download-issues.result == 'skipped') && (needs.labeler-train-issues.result == 'success' || needs.labeler-train-issues.result == 'skipped') }} - uses: dotnet/issue-labeler/.github/workflows/test-issues.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - model_cache_key: ${{ inputs.cache_key_suffix }} - label_prefix: "area-" - threshold: 0.40 + train-issues: + if: ${{ always() && contains(fromJSON('["Both", "Issues"]'), inputs.type) && contains(fromJSON('["All", "Train Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.download-issues.result) }} + 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 }} - labeler-download-pulls: - needs: build-predictor - if: ${{ inputs.download_pulls }} - permissions: - pull-requests: read - actions: write - uses: dotnet/issue-labeler/.github/workflows/download-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - data_cache_key: ${{ inputs.cache_key_suffix }} - pull_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} - page_size: ${{ inputs.pull_page_size && fromJSON(inputs.pull_page_size) || 1 }} - label_prefix: "area-" + train-pulls: + if: ${{ always() && contains(fromJSON('["Both", "Pull Requests"]'), inputs.type) && contains(fromJSON('["All", "Train Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.download-pulls.result) }} + runs-on: ubuntu-latest + permissions: {} + needs: download-pulls + steps: + - name: "Train Model for Pull Requests" + uses: dotnet/issue-labeler/train@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: "pulls" + data_cache_key: ${{ env.CACHE_KEY }} + model_cache_key: ${{ env.CACHE_KEY }} - labeler-train-pulls: - needs: labeler-download-pulls - if: ${{ inputs.train_pulls && always() && (needs.labeler-download-pulls.result == 'success' || needs.labeler-download-pulls.result == 'skipped') }} + test-issues: + if: ${{ always() && contains(fromJSON('["Both", "Issues"]'), inputs.type) && contains(fromJSON('["All", "Test Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.train-issues.result) }} + runs-on: ubuntu-latest permissions: - actions: write - uses: dotnet/issue-labeler/.github/workflows/train-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - data_cache_key: ${{ inputs.cache_key_suffix }} - model_cache_key: ${{ inputs.cache_key_suffix }} + issues: read + 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 }} + excluded_authors: ${{ env.EXCLUDED_AUTHORS }} + env: + GITHUB_TOKEN: ${{ github.token }} - labeler-test-pulls: - needs: [labeler-download-pulls, labeler-train-pulls] - if: ${{ inputs.test_pulls && always() && (needs.labeler-download-pulls.result == 'success' || needs.labeler-download-pulls.result == 'skipped') && (needs.labeler-train-pulls.result == 'success' || needs.labeler-train-pulls.result == 'skipped') }} - uses: dotnet/issue-labeler/.github/workflows/test-pulls.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 - with: - model_cache_key: ${{ inputs.cache_key_suffix }} - label_prefix: "area-" - threshold: 0.40 + test-pulls: + if: ${{ always() && contains(fromJSON('["Both", "Pull Requests"]'), inputs.type) && contains(fromJSON('["All", "Test Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.train-pulls.result) }} + runs-on: ubuntu-latest + permissions: + pull-requests: read + needs: train-pulls + steps: + - name: "Test Model for Pull Requests" + uses: dotnet/issue-labeler/test@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 + with: + type: "pulls" + 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 }} + excluded_authors: ${{ env.EXCLUDED_AUTHORS }} + env: + GITHUB_TOKEN: ${{ github.token }} From 3a9eb1b371bcd04a7dda504cfe3946d697c4b10a Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Thu, 1 May 2025 23:25:10 -0700 Subject: [PATCH 2/2] issue-labeler workflow customization for dotnet/dotnet-api-docs --- .github/workflows/labeler-cache-retention.yml | 2 +- .github/workflows/labeler-train.yml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/labeler-cache-retention.yml b/.github/workflows/labeler-cache-retention.yml index e982e7e2bfc..b9f0ad1a05e 100644 --- a/.github/workflows/labeler-cache-retention.yml +++ b/.github/workflows/labeler-cache-retention.yml @@ -6,7 +6,7 @@ name: "Labeler: Cache Retention" on: schedule: - - cron: "42 18 * * *" # 18:42 every day (arbitrary time daily) + - cron: "13 6 * * *" # 6:13 every day (arbitrary time daily) workflow_dispatch: inputs: diff --git a/.github/workflows/labeler-train.yml b/.github/workflows/labeler-train.yml index a8d5a841a4f..b3fd6dad2ca 100644 --- a/.github/workflows/labeler-train.yml +++ b/.github/workflows/labeler-train.yml @@ -25,8 +25,6 @@ on: - "Train Model" - "Test Model" - repository: - description: "The org/repo to download data from. Defaults to the current repository." 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 @@ -43,7 +41,7 @@ on: env: CACHE_KEY: ${{ inputs.cache_key_suffix }} - REPOSITORY: ${{ inputs.repository || github.repository }} + REPOSITORY: ${{ github.repository }} LABEL_PREFIX: "area-" THRESHOLD: "0.40" LIMIT: ${{ inputs.limit }}