Skip to content

chore(ci): scope workflow permissions and cancel stale typecheck runs - #45095

Open
arpankanwer wants to merge 1 commit into
anomalyco:devfrom
arpankanwer:fix/44671-44669-workflow-hardening
Open

chore(ci): scope workflow permissions and cancel stale typecheck runs#45095
arpankanwer wants to merge 1 commit into
anomalyco:devfrom
arpankanwer:fix/44671-44669-workflow-hardening

Conversation

@arpankanwer

@arpankanwer arpankanwer commented Aug 25, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #44671
Closes #44669

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

typecheck.yml had no concurrency and no permissions. storybook.yml and notify-discord.yml had no permissions. Other workflows pin permissions: contents: read, so these were oversights that leave GITHUB_TOKEN at the org default and waste runners on stale pushes.

Added the same dev/PR-isolated concurrency group from test.yml to typecheck.yml and added permissions: contents: read to all three workflows, keeping placement concurrency -> permissions -> jobs.

How did you verify your code works?

  • Ran python3 -c "import yaml; yaml.safe_load(open(...))" on all three workflows — parses OK.
  • Ran bun x prettier --check on the three files — style OK.
  • Compared concurrency group string to test.yml:10-14 and verified grep -L "permissions:" no longer lists these files.

Screenshots / recordings

N/A — CI config only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add missing concurrency group to typecheck.yml so stale runs are
cancelled on new pushes (matching test.yml dev/PR isolation logic).
Add explicit permissions: contents: read to typecheck.yml,
storybook.yml and notify-discord.yml to avoid falling back to the
org default and keep GITHUB_TOKEN least-privilege.

Fixes anomalyco#44671
Fixes anomalyco#44669
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential duplicate found:

PR #44670: "chore: set explicit permissions on workflows missing them"

This appears to be directly related to PR #45095. Both PRs address adding explicit permissions blocks to workflows that are missing them. The current PR (#45095) also adds concurrency controls to typecheck.yml and fixes the same issues (#44671, #44669) as PR #44670 likely addresses.

You should check the status and content of PR #44670 to determine if it's a true duplicate or if these PRs complement each other differently.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@arpankanwer
arpankanwer marked this pull request as ready for review August 25, 2026 23:07
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.

typecheck workflow has no concurrency group, so stale runs are never cancelled Three workflows have no explicit permissions block

1 participant