-
Notifications
You must be signed in to change notification settings - Fork 90
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
.github: add dependabot integration #1414
Conversation
@martinpitt any idea how I could test this on my own fork. The obvious issue is that I have no Test run here https://github.com/jelly/cockpit-podman/actions/runs/6251167467/job/16971695941?pr=8 So I should setup a NODE_CACHE repo and
This should be set |
@jelly I think the easier way to test this is to do this PR from an origin branch, and tell dependabot to create PRs against that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looking forward to getting this for our git-tracked node_modules/ as well!
Hmm, actually it wasn't too hard to set up the |
How Cockpit org loads the secrets https://github.com/cockpit-project/bots/blob/main/setup-deploy-keys |
Nevermind, this won't work because of GH restrictions. This whole approach needs more work: https://stackoverflow.com/a/58740879 Basically we need to do it the reposchutz way. It sort of works! https://github.com/jelly/cockpit-podman/actions/runs/6263734712/job/17008945862 Needs more hacking :) |
You can tell dependabot to use a different target branch, not sure if it helps: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#target-branch |
@martinpitt @allisonkarlitskaya after some 🤦 I got it working, but this requires some thought: Successful: https://github.com/jelly/cockpit-podman/actions/runs/6274863130/job/17041081841?pr=23 So this still makes Another issue is that we might not be able to rebase these PR's now, we can as Something else to think about is, should this dependabot set a P.S.: @allisonkarlitskaya as author of schutzbot you also get a say here :) |
Your test pr failed with
Which smells like the workflow didn't actually push the (correct or at all) updated node_modules?
That ought to work fine? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! There's still some current threads from my earlier review, I closed the resolved ones.
FYI: we might want to push as dependabot:
|
.github/workflows/dependabot.yml
Outdated
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
fetch-depth: 0 | ||
|
||
- name: Clear .github-changes label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixme, node_modules
cleared
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I feel the workflow is complex and subtle enough that it could do with a high-level comment at the top what it does, especially with the juggling of the two labels.
Dependabot creates a PR for us so we have to introduce a new action which updates node-modules for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I previously thought it was tied tightly to dependabot, but it really isn't -- in principle this works for any PR where we set the node_modules label. This is clear enough now -- I'd say, let it lose and we'll see what happens 😁
Not sure if @allisonkarlitskaya still wants to review this, though. Although there's nothing there that we can't change later on.
Oh right, I forgot to explain how it works. I can do that in a follow up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very quick look over it and I'm happy with the approach, thanks!
c8a723b
into
cockpit-project:main
Dependabot creates a PR for us so we have to introduce a new action which updates node-modules for us.