Skip to content

Update dependabot autocommit script and job #416

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

The implementation of the script that automatically approves dependabot PRs relied on issuing commands to dependabot by using comments in the PR such as @dependabot merge , this result in a comment in the PR Sorry, only users with push access can use that command.

I attempted to fix this by creating a GitHub App, giving it the correct permissions and then using an app installation token in the workflow , however this did not work either as it turns out that dependabot checks to see if the token belongs to a real user with push access to the repo when these commands are issued.

I resolved the issue by setting auto approve squash on the PR rather than use dependabot commands, I decided to leave the change that uses the app token for 2 reasons, firstly it means that the actions that the job takes are clear in the PR history (as they show up as dependabot-pr-auto-approver) , second the token in limited to the permissions required by the job and cannot obtain any other permissions unless the app is updated.

Use an app for the source of the token
Rather than issuing a merge command to dependabot set the PR to auto squash

Signed-off-by: Simon Davies <[email protected]>
@simongdavies simongdavies added the kind/dependencies For PRs that update dependencies or related components label Apr 14, 2025
@simongdavies simongdavies merged commit c89f72d into hyperlight-dev:main Apr 14, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/dependencies For PRs that update dependencies or related components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants