-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow dependabot PRs to complete without write access #83
base: main
Are you sure you want to change the base?
Conversation
@da1910 Looks like the token is valid, and in your name, but doesn't have permissions. Do you remember what it was created for, and if it should have write permissions? |
This token has only READ_PACKAGE permission, intended for pulling the code generator package. We could make a new token for this purpose, it'll need adding as an actions secret. I'm somewhat 👎 to the idea of adding commits inside a dependabot workflow run however... |
Well I think there are three possible outcomes from a dependabot run:
Of those 3 scenarios, 1. is going to happen the majority of the time, and so committing anything is a bad idea. But if 2. does happen, committing that change is the right thing to do. This is already sort of what's happening, it's just that the build number always gets bumped which triggers the commit. Maybe for dependabot we can think of a way of ignoring this change, and then only commit if something else has changed. |
…s/grantami-serverapi-openapi into ci/use-token-for-checkout
The current CI shows an example of adjusting the version number passed into the code autogeneration when dependabot runs. There are probably nicer ways of doing it, but the grep example illustrates the point. When the code generation runs, there are no actual changes required, and so the git step doesn't do anything. This should mean the dependabot PR will succeed, assuming there are no changes. If there are changes a human will have to intervene, but this will be required anyway. Another approach would be to eliminate the version bumping from the process altogether. I think it's useful for human-led PRs though, so I'm inclined to keep it. |
Use a token to checkout the repo if we are potentially going to create a commit.Dependabot-authored CI is currently failing because it doesn't have write permissions to the repo. I believe this is because the default token that is used for dependabot PRs doesn't have those permissions.According to theEndBug/add-and-commit
action, this token should be added when the repo is first cloned. Not 100% certain this is the right token, but we'll find out if we merge this and rebase the dependabot PR.This PR is a testing ground to investigate ways of allowing dependabot PRs to complete without repository write access.