Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(dependabot): enable auto merge #541

Closed
wants to merge 1 commit into from
Closed

ci(dependabot): enable auto merge #541

wants to merge 1 commit into from

Conversation

Crow-EH
Copy link
Contributor

@Crow-EH Crow-EH commented Sep 17, 2021

This is a work in progress.

Based on GA doc's example.

The pull_request_target event is like pull_request except it allows write permissions.

gh pr merge --auto --merge "$PR_URL" will enable auto-merging of the PR that triggered the event. The merge will occur only after all the required conditions are fulfilled (in our case the build checker workflow). Doc : https://cli.github.com/manual/gh_pr_merge

The metadata step allows to filter by update types in the second step, I configured it to auto-merge minor and patch only. There's seemingly no way to filter on package-ecosystem (like docker) atm, so we'll have to set auto-merge on every dependabot's PR or find an alternative if we want to filter.

Will require allowing auto-merge in repository settings.

TODO

  • Tweak the auto-merge behaviour (merged by github-actions[bot]) to trigger the master workflow, if possible and deemed necessary. WDYT @axelpavageau, would the PR workflow + scheduled workflow be enough ? It would publish on nightly only if I remember right, until next human merge or tag.
  • Try if it still works with only pull-requests: write permission
  • Try if action permission scope affects the triggering of master workflow after auto-merge by the bot

Tests

On my fork with auto-merge and dependabot enabled :

@Crow-EH Crow-EH marked this pull request as ready for review September 22, 2021 21:20
@Crow-EH Crow-EH marked this pull request as draft September 22, 2021 21:26
@Crow-EH Crow-EH self-assigned this Sep 22, 2021
@Crow-EH
Copy link
Contributor Author

Crow-EH commented Sep 29, 2021

Seeing how dependabots sometimes fails to respect the ignored update types (#542 even though ansible/pip should ignore major and minor), I don't even know if auto-merge would be a good idea.

Maybe keeping everything as is + removing the rebase requirement would do the trick @axelpavageau ?

Most of the time rebasing is not needed for dependabot's PR since all the PRs are on different images, and we can still request it verbally to contributors if needed (+ conflicts won't allow merging anyway).

It would allow faster chain merging of dependabot's PRs, reducing the effort while still allowing human control.

@Crow-EH
Copy link
Contributor Author

Crow-EH commented Feb 26, 2022

As discussed with @axelpavageau, it's not really an issue nowadays : Only building the images that changed was already enough to improve maintainers' quality of life.

closing

@Crow-EH Crow-EH closed this Feb 26, 2022
@axelpavageau axelpavageau deleted the auto-merge-deps branch May 25, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant