-
Notifications
You must be signed in to change notification settings - Fork 0
Test weekly reset #20
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
Conversation
|
Okay. It works. You can see the changes I made to the reset script (sourced from dogweb) and the "bootstrap" script (sourced from web-ui, but each repository that uses it has their own similar version) by looking at this commit which excludes the initial commit. It leverages this dd-octo-sts policy to get a token to manipulate the repository. It also uses this token in the bootstrap to fetch the actual script, but that's a special case. If you look at recent commits on reset-base you can see the commits created by the script that are updating CURRENT_STAGING. Additionally, you can see the in the "old" staging branch staging-30a that the follow-up commit to delete .gitlab-ci.yml was also successful. What's left?
For compatibility reasons, I suggest the |
|
One interesting thing I noticed in my tests is that the reset script, when it attempts to approve its own PR, is this error from GitHub: The original script used two different tokens, a "normal" token that creates and merges the PR, and an "admin" token that approves it. If we look at an automated pull request in web-ui you can see that the "normal" token is Dwight Tilghman ([email protected]) and the "admin" token is Because all of the tokens in-use here are coming from |
|
Alright. I addressed the reviewer issue with a simple action workflow. It is designed to automatically approve any pull request where the source branch starts with Additionally, I removed the approval step from the actual staging-reset.sh script. You can see the PR here: #25 |
1817462 to
52c78c0
Compare
|
For anyone watching here, using the Action to auto-approve is a no go, as it requires setting the unsafe repository setting that allows actions to approve and create pull requests. We're trying to get access to the user account used (currently) to approve & merge, at which point we'll get a fine grained token and use that (replacing only the token used to commit with dd-octo-sts). |
No description provided.