WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@luboszima
Copy link
Contributor

Related to: #435

Description

This change adds auto-approve logic. For trusted sources in restricted repositories, you can enable auto-approval of created pull requests to skip some manual work and waiting for reviewers.

Whether to automatically approve the created Pull Request.
Requires a token with 'pull-requests: write' permission.
re-used output from peter-evans/create-pull-request
@github-actions github-actions bot added documentation Improvements or additions to documentation action:pr labels Nov 25, 2025
@ericcornelissen ericcornelissen added the enhancement New feature or request label Nov 25, 2025
Copy link
Owner

@ericcornelissen ericcornelissen left a comment

Choose a reason for hiding this comment

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

This looks good, just some minor things to work out 🙂

Copy link
Owner

@ericcornelissen ericcornelissen left a comment

Choose a reason for hiding this comment

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

Looks good now, I'll just test it manually before I merge.

@ericcornelissen ericcornelissen removed the documentation Improvements or additions to documentation label Nov 26, 2025
@ericcornelissen
Copy link
Owner

@luboszima, did you test this? I'm getting this error:

[...]
Run gh pr review --approve "$PR_URL"
  
failed to create review: GraphQL: Can not approve your own pull request (addPullRequestReview)
Error: Process completed with exit code 1.

with this workflow:

name: Tooling
on:
  workflow_dispatch: ~

permissions: read-all

jobs:
  tooling:
    name: Update tooling
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - name: Update tooling
        uses: luboszima/tool-versions-update-action/pr@feat/pr-auto-approve
        with:
          pr-auto-approve: true

@ericcornelissen
Copy link
Owner

@luboszima - ping in case this fell of your radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action:pr enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants