Skip to content

chore: fix issue labeler and restrict workflow token permissions#9058

Merged
mikehardy merged 2 commits into
mainfrom
ci-cleanup
Jun 20, 2026
Merged

chore: fix issue labeler and restrict workflow token permissions#9058
mikehardy merged 2 commits into
mainfrom
ci-cleanup

Conversation

@mikehardy

Copy link
Copy Markdown
Collaborator

Summary

Two CI hygiene problems on main:

  1. Issue labeler brokenissue-labels.yaml pinned actions-ecosystem/action-add-labels to a non-existent SHA (typo in commit 8e53fa6b3), so every run failed at action download since 2026-06-18. The actions-ecosystem actions are also unmaintained.
  2. Over-broad default token — Most workflows inherited the org default GITHUB_TOKEN scope instead of declaring minimal permissions.

Decisions: Replace the three ecosystem actions with github-script and the default token (issues: write only); drop the admin GH_TOKEN dependency for this workflow. Add explicit minimal permissions per workflow (contents: read + actions: write where cache/artifacts are used). Fix a stale-bot message typo while touching stale.yml.

Remediation: Audited all failed labeler runs; only one had a missed action (closed-item comment on #8914), already posted manually.

Test plan

  • CI green on this PR
  • Observe labeler behavior on real issue/PR comments over the next few days (OP reply on open → Needs Attention / remove blocked: customer-response; OP reply on closed → standard bot comment)

Replace unmaintained actions-ecosystem actions with github-script,
use step outputs instead of env context, and restrict token permissions
to issues: write only.
Declare explicit minimal GITHUB_TOKEN permissions on workflows that
previously inherited the org default, and fix a missing newline in the
stale issue message.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@mikehardy

Copy link
Copy Markdown
Collaborator Author

this has already passed any of the CI checks that would be affected by the changes --> merging so labeler is fixed

@mikehardy mikehardy merged commit de48420 into main Jun 20, 2026
20 checks passed
@mikehardy mikehardy deleted the ci-cleanup branch June 20, 2026 13:52
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.38%. Comparing base (7cf7c1a) to head (50d6df2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9058      +/-   ##
==========================================
+ Coverage   60.88%   61.38%   +0.50%     
==========================================
  Files         286      286              
  Lines       14492    14494       +2     
  Branches     3108     3047      -61     
==========================================
+ Hits         8822     8895      +73     
+ Misses       5625     5515     -110     
- Partials       45       84      +39     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant