merge-me-action icon indicating copy to clipboard operation
merge-me-action copied to clipboard

Action prints an error upon merging, but merges successfully

Open antoineco opened this issue 1 year ago • 1 comments

How would you describe the issue?

Upon merging while authenticated as a GitHub Application (bot), the Action prints the following error, but merges successfully anyway:

An error occurred while merging the Pull Request. This is usually caused by the base branch being out of sync with the target branch. In this case, the base branch must be rebased. Some tools, such as Dependabot, do that automatically.

The step doesn't fail despite the error, it simply returns successfully and the PR gets merged.

Example from a recent workflow run: https://github.com/deviantony/docker-elk/actions/runs/3555997794/jobs/5973029853#step:3:12

The Application has the following permissions assigned:

  • Administration (Read-only)
  • Pull request (Read-only)
  • Contents (Read and write)
  • Metadata (Read-only)

How can we reproduce the issue?

on:
  workflow_run:
    workflows: [ CI ]
    types:
      - completed

# ...

jobs:

  merge:
    if: github.event.workflow_run.conclusion == 'success'
    runs-on: ubuntu-latest

    steps:
      - name: Approve and merge
        uses: ridedott/merge-me-action@v2
        with:
          GITHUB_LOGIN: my-app-name
          GITHUB_TOKEN: my-app-token

What are the expected results?

Print a more detailed error: what failed and why.

Alternatively, don't print an error if the PR was merged successfully.

How much does it hurt?

1/10

antoineco avatar Nov 27 '22 09:11 antoineco