Mergifyio / Mergifyio/mergify

Mergify doesn't merge for commits from an app

Open
#5,178 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
339
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Hello. I created an app to push PR's to my repos and I'm trying to merge the PR's automatically with mergify.

First, I set up a mergify rule to merge when the author is mxr-base-sync[bot]: https://github.com/mxr/dotfiles/blob/b523380a1353072c599f4f559922332ac04345a1/.github/mergify.yml#L17-L22

Then, my workflow opened https://github.com/mxr/dotfiles/pull/70 with a commit attributed to mxr-base-sync[bot]:

$ git show 02e2d72938debbbbb3444747c59f43fbaf17823d | head -n2
commit 02e2d72938debbbbb3444747c59f43fbaf17823d
Author: mxr-base-sync[bot] <306625798+mxr-base-sync[bot]@users.noreply.github.com>

However mergify didn't merge the PR. First, the mergify check on the PR says that none of the rules are applicable and author=mxr-base-sync[bot] didn't match. Also, when I check the activity logs, there are no events:

I thought my rule was misconfigured. But when I type @Mergifyio refresh then I see an entry in the activity log and the PR automerges. I believe the PR should merge without needing to do that. An example of such merge-on-refresh is https://github.com/mxr/dotfiles/pull/69 - Mergify doesn't match any rules initially but only matches on refresh. So I feel my rules are correct and also the rules for author=pre-commit-ci[bot] and author=renovate[bot] match with no issues (see github.com/mxr/sync-typing-deps for examples of both of those bots merging automatically).

Could you take a look please? Thank you

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Mergify configuration and PRs 70 and 69, then compare the initial check and activity log with the result after @Mergifyio refresh. Confirm that the app-authored commit event is evaluated against author=mxr-base-sync[bot] without manual refresh, while preserving matching for the pre-commit-ci and renovate examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.