From 5b4712e2a8febf6c548d04e9580c7580554da39f Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Sat, 13 Jun 2026 04:34:44 -0700 Subject: [PATCH 1/2] Align Tester favorable-threshold Tip text with the code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In IssueLabeler/src/Tester/Tester.cs, the AlertType decision uses stats.MismatchesPercentage < 0.15f to render the green Note banner (vs the yellow Warning banner) for the 'finished testing' summary. The Tip alert rendered immediately below that banner, however, told the reader the favorable threshold was 'less than 10%'. A run with, say, 13% mismatches would land on a green 'favorable' banner sitting right next to a Tip claiming favorability required less than 10% mismatches — leaving the reader unsure which piece of UI to trust. Update the Tip text to 'less than 15%' so it matches the decision the code actually makes. No behavioural change: any run that rendered green before still renders green; any run that rendered yellow before still renders yellow. Only the help text changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- IssueLabeler/src/Tester/Tester.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IssueLabeler/src/Tester/Tester.cs b/IssueLabeler/src/Tester/Tester.cs index 1c1a1c8..ef1b3b2 100644 --- a/IssueLabeler/src/Tester/Tester.cs +++ b/IssueLabeler/src/Tester/Tester.cs @@ -85,7 +85,7 @@ "**No Existing Label**: A prediction was made, but there was no existing label. Incorrect prediction." ]); summary.AddNewLine(); - summary.AddAlert($"If the **Matches** percentage is **at least 65%** and the **Mismatches** percentage is **less than 10%**, the model testing is considered favorable.", AlertType.Tip); + summary.AddAlert($"If the **Matches** percentage is **at least 65%** and the **Mismatches** percentage is **less than 15%**, the model testing is considered favorable.", AlertType.Tip); }); } From 16c1d2eba95d39d06c77e4d53ffca540cc67a87d Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Sat, 13 Jun 2026 04:40:02 -0700 Subject: [PATCH 2/2] Standardize type-value ordering to (issues, pulls, discussions) The promote and predict actions, the cache-retention workflow's matrix, and Predictor/Args.cs all order the three supported content types as (issues, pulls, discussions). The download, restore, test, train, and labeler-train action/workflow files inconsistently used (issues, discussions, pulls). Standardize on the canonical (issues, pulls, discussions) order across all action.yml files and the labeler-train.yml workflow: * download/action.yml, restore/action.yml, test/action.yml, train/action.yml: input descriptions, bash validation conditions, error messages, step-summary text, and step-summary ternary fallthroughs. * .github/workflows/labeler-train.yml: workflow header comment, type input description, and the workflow_dispatch type choice options (now All, Issues, Pull Requests, Discussions). No behavior changes. The set of accepted/rejected values is unchanged. The ternary fallthroughs ( ype == 'issues' && 'Issues' || type == 'pulls' && 'Pull Requests' || 'Discussions') produce identical output for every accepted input. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/labeler-train.yml | 6 +++--- download/action.yml | 12 ++++++------ restore/action.yml | 12 ++++++------ test/action.yml | 10 +++++----- train/action.yml | 12 ++++++------ 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/labeler-train.yml b/.github/workflows/labeler-train.yml index 5e81e2c..50277a1 100644 --- a/.github/workflows/labeler-train.yml +++ b/.github/workflows/labeler-train.yml @@ -1,19 +1,19 @@ -# Train the Issues, Discussions, and Pull Requests models for label prediction +# Train the Issues, Pull Requests, and Discussions models for label prediction name: "Labeler: Training" on: workflow_dispatch: inputs: type: - description: "Issues, Discussions, or Pull Requests" + description: "Issues, Pull Requests, or Discussions" type: choice required: true default: "All" options: - "All" - "Issues" - - "Discussions" - "Pull Requests" + - "Discussions" steps: description: "Training Steps" diff --git a/download/action.yml b/download/action.yml index 60684c3..8b08c85 100644 --- a/download/action.yml +++ b/download/action.yml @@ -1,5 +1,5 @@ name: "Download Data" -description: "Download GitHub issues, discussions, or pull requests and cache the data." +description: "Download GitHub issues, pull requests, or discussions and cache the data." branding: color: "purple" @@ -7,7 +7,7 @@ branding: inputs: type: - description: "The type of data to download. Must be 'issues', 'discussions', or 'pulls'." + description: "The type of data to download. Must be 'issues', 'pulls', or 'discussions'." required: true label_prefix: description: "The label prefix to be used for model training. Must end in a non-alphanumeric character." @@ -34,10 +34,10 @@ runs: - name: "Validate inputs and set cache variables" shell: bash run: | - if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then - echo "::error::'type' must be one of 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'" + if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then + echo "::error::'type' must be one of 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'" echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY - echo "\`type\` must be one of 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY + echo "\`type\` must be one of 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY exit 1 fi @@ -94,5 +94,5 @@ runs: shell: bash run: | echo "" >> $GITHUB_STEP_SUMMARY - echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} Data Available as '${{ inputs.cache_key }}'" >> $GITHUB_STEP_SUMMARY + echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} Data Available as '${{ inputs.cache_key }}'" >> $GITHUB_STEP_SUMMARY echo "The '${{ inputs.cache_key }}' data is saved to cache and available for training a model." >> $GITHUB_STEP_SUMMARY diff --git a/restore/action.yml b/restore/action.yml index a358d0d..0e6e196 100644 --- a/restore/action.yml +++ b/restore/action.yml @@ -3,7 +3,7 @@ description: "Restore a model from cache for label prediction or cache retention inputs: type: - description: "The model to restore. Must be 'issues', 'discussions', or 'pulls'. Each type restores its own cached model file." + description: "The model to restore. Must be 'issues', 'pulls', or 'discussions'. Each type restores its own cached model file." required: true cache_key: @@ -33,10 +33,10 @@ runs: - name: "Validate Inputs" shell: bash run: | - if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then - echo "::error::'type' must be 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'." + if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then + echo "::error::'type' must be 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'." echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY - echo "\`type\` must be 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY + echo "\`type\` must be 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY exit 1 fi @@ -54,10 +54,10 @@ runs: run: | if [[ "${{ steps.restore-cache.outputs.cache-hit }}" == "true" ]]; then echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY - echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} model was successfully restored from cache." >> $GITHUB_STEP_SUMMARY + echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} model was successfully restored from cache." >> $GITHUB_STEP_SUMMARY else echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY - echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} model was not restored from cache. Label prediction cannot proceed." >> $GITHUB_STEP_SUMMARY + echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} model was not restored from cache. Label prediction cannot proceed." >> $GITHUB_STEP_SUMMARY if [[ "${{ inputs.fail-on-cache-miss }}" != "true" ]]; then echo "> The workflow is gracefully exiting without failure." >> $GITHUB_STEP_SUMMARY diff --git a/test/action.yml b/test/action.yml index 5251944..3b296f5 100644 --- a/test/action.yml +++ b/test/action.yml @@ -1,5 +1,5 @@ name: "Test Model" -description: "Test predictions against the Issues, Discussions, and/or Pull Requests model by downloading data and comparing predictions against existing labels." +description: "Test predictions against the Issues, Pull Requests, and/or Discussions model by downloading data and comparing predictions against existing labels." branding: color: "purple" @@ -7,7 +7,7 @@ branding: inputs: type: - description: "The model to test. Must be 'issues', 'discussions', or 'pulls'. Discussions use the issues model path." + description: "The model to test. Must be 'issues', 'pulls', or 'discussions'. Discussions use the issues model path." required: true label_prefix: description: "The label prefix to use for model training. Must end with a non-alphanumeric character." @@ -39,10 +39,10 @@ runs: - name: "Validate Inputs" shell: bash run: | - if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then - echo "::error::'type' must be 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'." + if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then + echo "::error::'type' must be 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'." echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY - echo "\`type\` must be 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY + echo "\`type\` must be 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY exit 1 fi diff --git a/train/action.yml b/train/action.yml index 87d08e8..7fe5f9e 100644 --- a/train/action.yml +++ b/train/action.yml @@ -1,9 +1,9 @@ name: "Train Model" -description: "Train the Issues, Discussions, or Pull Requests model for label prediction. Each type writes its own cached model file." +description: "Train the Issues, Pull Requests, or Discussions model for label prediction. Each type writes its own cached model file." inputs: type: - description: "The model to train. Must be 'issues', 'discussions', or 'pulls'." + description: "The model to train. Must be 'issues', 'pulls', or 'discussions'." required: true data_cache_key: description: "The cache key suffix to use for the downloaded data. Defaults to 'staged'." @@ -22,10 +22,10 @@ runs: - name: "Validate Inputs" shell: bash run: | - if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then - echo "::error::'type' must be 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'." + if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then + echo "::error::'type' must be 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'." echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY - echo "\`type\` must be 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY + echo "\`type\` must be 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY exit 1 fi @@ -92,7 +92,7 @@ runs: shell: bash run: | echo "" >> $GITHUB_STEP_SUMMARY - echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} Model Available as '${{ inputs.model_cache_key }}'." >> $GITHUB_STEP_SUMMARY + echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} Model Available as '${{ inputs.model_cache_key }}'." >> $GITHUB_STEP_SUMMARY if [[ "${{ inputs.model_cache_key }}" == "ACTIVE" ]]; then echo "Label predictions will now use this model." >> $GITHUB_STEP_SUMMARY