Skip to content

Add and isolate content:write permission for pre-commit updates#166

Merged
colindean merged 5 commits into
mainfrom
permissions-pre-commit-fix
Aug 20, 2025
Merged

Add and isolate content:write permission for pre-commit updates#166
colindean merged 5 commits into
mainfrom
permissions-pre-commit-fix

Conversation

@colindean
Copy link
Copy Markdown
Contributor

This workflow has been failing because of the permissions revocation in a previous commit. This commit restores that permission set at a job-granular level.

This workflow has been failing because of the permissions revocation in a previous commit. This commit restores that permission set at a job-granular level.
@colindean colindean requested a review from Copilot August 20, 2025 16:22

This comment was marked as outdated.

colindean and others added 2 commits August 20, 2025 12:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@colindean colindean requested a review from Copilot August 20, 2025 16:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a failing pre-commit update workflow by restoring the contents:write permission at a job-granular level, which was previously revoked. The solution separates the auto-update logic from the PR creation logic to follow the principle of least privilege.

  • Splits the workflow into two jobs to isolate permissions
  • Adds artifact upload/download mechanism to transfer updated files between jobs
  • Grants contents:write permission only to the PR creation job

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread .github/workflows/pre-commit-updates.yml
Comment thread .github/workflows/pre-commit-updates.yml Outdated
colindean and others added 2 commits August 20, 2025 12:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
I think Copilot misled me.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@colindean colindean enabled auto-merge August 20, 2025 16:33
@colindean colindean merged commit 27a069c into main Aug 20, 2025
7 of 8 checks passed
@colindean colindean deleted the permissions-pre-commit-fix branch August 20, 2025 16:37
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