Skip to content

Add GH job and script to auto approve dependabot PRs. #411

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

Merged

Conversation

simongdavies
Copy link
Contributor

@simongdavies simongdavies commented Apr 10, 2025

Issue #299 suggested batching GH PRs to cut down the overhead of dealing with them, a large part of that overhead is caused by having to review/approve/merge each request alongside the impact of updates to main making it hard to merge other PRs (because of the way we need to merge due to other GH issues).

This PR attempts to solve these issues by automating the process of approval and merging of dependabot PRs, and doing it at a time when there should be less merging of "real" PRs taking place. It does the following:

Runs the dependabot job at 03:00 UTC.
Runs a new job at 04:00 UTC, this job runs a script which checks for any open PRs authored by dependabot, or each one it finds it checks the following:

That the PR only modifies Cargo.lock/Cargo.toml or GH actions workflows.
No status checks have failed.
That no one has added any commits manually.

If all these checks are true then it automatically approves the PR and requests dependabot to merge it

@simongdavies simongdavies added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Apr 10, 2025
@simongdavies simongdavies force-pushed the process-dependabot-prs branch from 2882dc9 to 1718142 Compare April 10, 2025 15:20
dblnz
dblnz previously approved these changes Apr 10, 2025
@simongdavies
Copy link
Contributor Author

@dblnz I addressed your comments and also updated the login in the script to address issues with pending checks.

@simongdavies simongdavies force-pushed the process-dependabot-prs branch from 85fd54b to 1017cf0 Compare April 10, 2025 18:48
@simongdavies simongdavies merged commit 300552d into hyperlight-dev:main Apr 14, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants