Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Sep 6, 2025

This PR contains the following updates:

Package Type Update Change
actions/github-script action major v7.0.1 -> v8.0.0

Release Notes

actions/github-script (actions/github-script)

v8.0.0

Compare Source

v7.1.0

Compare Source


Configuration

📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the renovate label Sep 6, 2025
@renovate renovate bot enabled auto-merge (squash) September 6, 2025 02:29
@github-actions
Copy link

github-actions bot commented Sep 6, 2025

This change updates the GitHub workflow for cleaning up build references by upgrading the actions/github-script dependency to a newer major version, ensuring compatibility with the latest features and security fixes while keeping the workflow stable.

Walkthrough

  • Chore: Upgraded the actions/github-script action from v7.0.1 to v8.0.0 in the build-cleanup workflow.

Model: o4-mini | Prompt Tokens: 314 | Completion Tokens: 356

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Here is supportive feedback on your code, powered by AI insights. Some suggestions may not suit every situation, so pick what works best for you. You guide the process while AI lends a helpful hand.
Model: o4-mini | Prompt Tokens: 724 | Completion Tokens: 2160

contents: write
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
Copy link

Choose a reason for hiding this comment

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

You’re pinning the action by its full commit SHA, which reduces readability and makes upgrades harder. It’s usually better to target the major version tag (e.g. @v8) or a full semver range to get non-breaking updates automatically. For example:

steps:
  - uses: actions/github-script@v8      # pulls latest v8.x.x
    with:
      script: |
        github.rest.git.deleteRef({
          owner: context.repo.owner,
          repo: context.repo.repo,
          ref: 'refs/heads/old-branch'
        })

contents: write
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
Copy link

Choose a reason for hiding this comment

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

The inline comment for the version (# v8.0.0) is now out of sync with your SHA pin. Either update or remove it entirely to avoid confusion. If you switch to @v8 you can drop the comment, since it’s implied by the tag’s semantics.

Comment on lines 21 to 22
script: |
github.rest.git.deleteRef({
Copy link

Choose a reason for hiding this comment

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

It’s safer to wrap the delete in a try/catch so that a missing ref (404) won’t fail the entire workflow. Here’s an example:

with:
  script: |
    try {
      await github.rest.git.deleteRef({
        owner: context.repo.owner,
        repo: context.repo.repo,
        ref: 'refs/heads/old-branch'
      })
      console.log('Ref deleted successfully')
    } catch (error) {
      if (error.status === 404) {
        console.log('Branch not found, skipping deletion')
      } else {
        throw error
      }
    }

@renovate renovate bot merged commit 9218fd3 into main Sep 6, 2025
13 checks passed
@renovate renovate bot deleted the renovate/actions-github-script-8.x branch September 6, 2025 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant