Skip to content

Conversation

Copy link

Copilot AI commented Oct 2, 2025

Summary

This PR adds the required actions: write permission to workflow jobs that use actions/stale. The actions/stale action needs write access to the Actions API to delete its old cache before saving a new one.

Changes

Updated two workflow files in the auto-merged repositories:

  • auto-merge/contrib/.github/workflows/close-stale.yml
  • auto-merge/js/.github/workflows/close-stale.yml

Both files now include a permissions block at the job level with the following structure:

permissions:
  contents: read
  actions: write # because actions/stale deletes its old cache before saving new one
  issues: write
  pull-requests: write

The permissions are correctly ordered with:

  1. contents: read (base permission)
  2. actions: write (required for cache management)
  3. issues: write (required for managing issue labels and comments)
  4. pull-requests: write (required for managing PR labels and comments)

Why This Matters

Without the actions: write permission, the actions/stale action may fail or operate with degraded functionality when trying to manage its cache, potentially causing workflow failures or unexpected behavior.

Fixes #[issue-number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Add missing actions/stale permission</issue_title>
<issue_description>Check if any workflow jobs are using actions/stale.

If so, make sure that the permissions block for that job contains

actions: write

If any of the other permissions lines have trailing comments, then add a trailing comment for this one too:

actions: write # because actions/stale deletes its old cache before saving new one

Place this new permission in a specific order within the permissions, directly before both:

issues: write
pull-requests: write

(which implicitly means after contents: read)</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #23

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Add missing actions/stale permission Add missing actions: write permission to stale workflows Oct 2, 2025
Copilot AI requested a review from trask October 2, 2025 15:36
Copilot finished work on behalf of trask October 2, 2025 15:36
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.

Add missing actions/stale permission

2 participants