ahmadnassri / action-dependabot-auto-merge

Automatically merge Dependabot PRs when version comparison is within range
MIT License
342 stars 48 forks source link

Sorry, only users with push access can use that command. #144

Open rickyrauch opened 2 years ago

rickyrauch commented 2 years ago

Hello !

I know there are many issues related to this problem but still can't make it to work.

The repo is under our organization and I created the new token under my personal account.

Screen Shot 2022-05-24 at 11 02 39 AM

This is the output of the action:

Screen Shot 2022-05-24 at 11 06 36 AM

Thanks!

MerlinMason commented 2 years ago

I'm struggling with the same issue too, also in a private organisation repo. I've given the job the following permissions

permissions:
  pull-requests: write
  contents: write

But also get the same automated comment back.

ahmadnassri commented 2 years ago

apologies for delayed follow up, I've been dealing with personal issues and have not had time to help debug.

any community member help is more than appreciated.

though a quick hint would be to try using PAT (Personal Access Tokens) if you're blocked as I've found more success with those than the generated tokens by github.

I'm hoping next week will be a time I can get some apace for myself to catch up on this and other projects

finnSMB commented 2 years ago

@rickyrauch @MerlinMason has any one of you two figured out a way to solve this? I am currently struggling with this issue too, private repo, not in an orga.

MerlinMason commented 2 years ago

@finnSMB no but yes... I ended up swapping to https://github.com/fastify/github-action-merge-dependabot with the following config which has been working great.

auto-merge:
        name: Auto-Merge PRs by Dependabot
        needs:
            - check-linting
            - check-dependencies
            - check-cypress
            - check-unit-tests
        runs-on: ubuntu-latest
        permissions:
            pull-requests: write
            contents: write
        steps:
          - uses: fastify/github-action-merge-dependabot@v3.0.0
            with:
                github-token: ${{ secrets.GITHUB_TOKEN }}
                target: minor
finnSMB commented 2 years ago

I appreciate it, thank you @MerlinMason