Skip to content

Block disable-all-workflows.sh when logged-in user doesn't match repo owner - #12

Merged
mikeharder merged 2 commits into
mainfrom
copilot/update-disable-all-workflows-block-user
Apr 10, 2026
Merged

mikeharder merged 2 commits into
mainfrom
copilot/update-disable-all-workflows-block-user

Conversation

Copilot AI commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Adds a safety guard to prevent accidentally disabling workflows on repos you don't own.

  • After auth check, fetches the authenticated user via gh api /user and compares against the <owner> argument
  • Aborts with a clear error if they don't match
$ ./disable-all-workflows.sh some-other-user some-repo
❌ Logged-in user 'myuser' does not match repo owner 'some-other-user'. Aborting.

@mikeharder
mikeharder merged commit d9767be into main Apr 10, 2026
1 check passed
@mikeharder
mikeharder deleted the copilot/update-disable-all-workflows-block-user branch April 10, 2026 22:31
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.

2 participants