Closed DanySK closed 3 months ago
Suggested solutions:
if the new behavior is intentional, consider not running the operation and notify with a message rather than failing entirely (thus also blocking auto-merge from renovate).
Hi @DanySK do you have a pull request link where we can see the failure?
Sure: https://github.com/AlchemistSimulator/Alchemist/pull/2086
Edit: adding a snapshot, as in case of modifications the run would be different
It is even worse: also explicitly excluding accounts that cannot be impersonated lead to an error in mergify:
pull_request_rules:
- name: Auto-rebase if appropriately labeled
conditions:
- label=auto-update-rebase
# work around for Mergifyio/mergify#5074
- not:
or: &authors_are_bots
- author=renovate[bot]
- author=dependabot[bot]
- -draft
- -conflict
actions:
rebase:
The new behavior is due to this change: https://changelog.mergify.com/changelog/rebasing-pull-requests-with-a-random-user-is-deprecated
Yes, but, with the new policy, rebasing may cause Mergify to fail.
I would suggest having an option like fallback_to_random_org_user
, defaulting to false
. Mergify would then:
bot_account
is specified, use the bot accountbot account
is unspecified (or cannot be specified, as the account has no premium access):
fallback_to_random_org_user
is true
, find a member of the organization to impersonate (legacy behavior)I believe I am running into the same issue using the rebase action with dependabot as the PR author. I get the following error:
In the rule Automatic rebase, the action rebase configuration is invalid: Invalid bot_account value GitHub login contains invalid characters: dependabot[bot]
Is there a potential workaround for PRs created by GitHub applications to still utilize the rebase action?
Since bot_account
is no longer a premium feature, the original issue can be resolved by using a machine user with force-push permissions.
Expected Behavior
It is possible to rebase PRs created by GitHub applications (such as dependabot or renovate) with the free version of mergify. Worst case, with the previous behaviour (randomly picked user with sufficient rights)
Actual Behavior
Leaving
bot_account
unspecified prevents the rebase (the user cannot be impersonated). Specifying the bot account makes Mergify fail (premium feature)Steps to Reproduce the Problem
Specifications
Example config triggering the problem