automerge icon indicating copy to clipboard operation
automerge copied to clipboard

Merge Failed

Open NotKyoyo opened this issue 2 years ago • 6 comments

Do you have any idea why this happening? image

NotKyoyo avatar Oct 23 '22 17:10 NotKyoyo

What's in your workflow configuration?

pull-request-author-associations must be one of these https://docs.github.com/en/graphql/reference/enums#commentauthorassociation.

In your case I assume you would want to set it to OWNER.

reitermarkus avatar Oct 28 '22 08:10 reitermarkus

name: Automerge

on:
  # Try enabling auto-merge for all open pull requests. (Only recommended for testing.)
  push:

  # Try enabling auto-merge for all open pull requests.
  schedule:
    - cron: 0 * * * *

  # Try enabling auto-merge for a pull request when a draft is marked as “ready for review”, when
  # a required label is applied or when a “do not merge” label is removed, or when a pull request
  # is updated in any way (opened, synchronized, reopened, edited).
  pull_request_target:
    types:
      - opened
      - synchronized
      - reopened
      - edited
      - labeled
      - unlabeled
      - ready_for_review

jobs:
  automerge:
    runs-on: ubuntu-latest
    steps:
      - uses: reitermarkus/automerge@v2
        with:
          token: ${{ secrets.MY_GITHUB_TOKEN }}
          merge-method: rebase
          do-not-merge-labels: block-merge
          required-labels: hacktober-accepted
          pull-request-author-associations: NotKyoyo,kyrea
          pull-request: ${{ github.event.inputs.pull-request }}
          dry-run: false

Here's my config.

NotKyoyo avatar Oct 30 '22 13:10 NotKyoyo

Okay, as I suspected above,

pull-request-author-associations: NotKyoyo,kyrea

is your problem. This can only contain author associations, not user names.

reitermarkus avatar Nov 01 '22 15:11 reitermarkus

Is there anyway to check it for username?

On Tue, Nov 1, 2022, 20:30 Markus Reiter @.***> wrote:

Okay, as I suspected above,

pull-request-author-associations: NotKyoyo,kyrea

is your problem. This can only contain author associations, not user names.

— Reply to this email directly, view it on GitHub https://github.com/reitermarkus/automerge/issues/1943#issuecomment-1298635718, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4VXTWYT4S3YK7H2XEECWTWGEV7ZANCNFSM6AAAAAARMMHJGI . You are receiving this because you authored the thread.Message ID: @.***>

NotKyoyo avatar Nov 01 '22 15:11 NotKyoyo

Not currently. Doesn't OWNER or COLLABORATOR cover your use case?

reitermarkus avatar Nov 01 '22 15:11 reitermarkus

No unfortunately:(

On Tue, Nov 1, 2022, 21:15 Markus Reiter @.***> wrote:

Not currently. Doesn't OWNER or COLLABORATOR cover your use case?

— Reply to this email directly, view it on GitHub https://github.com/reitermarkus/automerge/issues/1943#issuecomment-1298734840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4VXTSJVHP25HDRKP2MF3TWGE3LPANCNFSM6AAAAAARMMHJGI . You are receiving this because you authored the thread.Message ID: @.***>

NotKyoyo avatar Nov 02 '22 15:11 NotKyoyo

For the pull_request_target event at least, you can probably use

if: ${{ contains(fromJSON('["NotKyoyo", "kyrea"]'), github.event.pull_request.user.login) }}

For now, I don't think it's worth adding username granularity to this action itself though.

reitermarkus avatar Feb 19 '24 15:02 reitermarkus