Skip to content

fix: move workflow permissions to top#7

Merged
shavonn merged 1 commit into
mainfrom
fix/pr-perms-workflow
Apr 1, 2026
Merged

fix: move workflow permissions to top#7
shavonn merged 1 commit into
mainfrom
fix/pr-perms-workflow

Conversation

@shavonn
Copy link
Copy Markdown
Contributor

@shavonn shavonn commented Apr 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 00:39
@shavonn shavonn merged commit 356c520 into main Apr 1, 2026
2 checks passed
@shavonn shavonn deleted the fix/pr-perms-workflow branch April 1, 2026 00:39
Copy link
Copy Markdown

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 updates the release workflow configuration to define GitHub Actions token permissions at the workflow level (instead of job-level), and mirrors that change in the README’s usage example.

Changes:

  • Move permissions: { contents: write, pull-requests: write } to the top level in .github/workflows/release.yml.
  • Update the README’s workflow snippet to match the new permission placement.
  • Introduce a couple of whitespace-only changes (blank lines containing spaces).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
README.md Updates the documented workflow example to place permissions at the workflow level.
.github/workflows/release.yml Moves permissions from the release job to the workflow root.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +49 to 55

permissions:
contents: write
pull-requests: write

jobs:
release:
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The YAML example now sets permissions at the workflow level, but the later "## Permissions" section still says to set permissions under the job's permissions key. Please update that text to reflect that workflow-level permissions is also valid (or adjust the example back to job-level) so the README stays consistent.

Suggested change
permissions:
contents: write
pull-requests: write
jobs:
release:
jobs:
release:
permissions:
contents: write
pull-requests: write

Copilot uses AI. Check for mistakes.
Comment thread README.md
on:
pull_request:
types: [ closed ]

Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

This blank line contains trailing whitespace. Please remove the extra spaces to avoid churn in diffs and potential whitespace/linting failures.

Suggested change

Copilot uses AI. Check for mistakes.
on:
pull_request:
types: [ closed ]

Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

This blank line contains trailing whitespace. Please remove the extra spaces to avoid churn in diffs and potential whitespace/linting failures.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +6 to 12

permissions:
contents: write
pull-requests: write

jobs:
release:
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Moving permissions to the workflow level makes these write permissions the default for all jobs in this workflow. If additional jobs are added later, consider either keeping write permissions scoped to the release job or explicitly overriding permissions for other jobs to preserve least-privilege.

Suggested change
permissions:
contents: write
pull-requests: write
jobs:
release:
jobs:
release:
permissions:
contents: write
pull-requests: write

Copilot uses AI. Check for mistakes.
@shavonn shavonn added the bug Something isn't working label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working change-release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants