Skip to content

Add auto-approve step for go code by dependabot #65

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
merged 2 commits into from
Jun 29, 2020

Conversation

chrisgilmerproj
Copy link

This is copied from milmove. You can see the original code here: https://github.com/transcom/mymove/blob/master/.github/workflows/go-auto-approve.yml

The point is to allow dependabot to suggest and auto-merge changes.

@chrisgilmerproj chrisgilmerproj requested a review from a team June 29, 2020 20:55
@chrisgilmerproj chrisgilmerproj self-assigned this Jun 29, 2020
Copy link
Contributor

@eeeady eeeady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanna make sure I. understand what this is doing... if depndabot submits a PR this workflow will trigger. in the workflow, it'll check out thecode. setup go and run go mod tidy then check it back in?

So this will have a tidy version of the module version changes that dependabot suggests?

Did y'all run into any issues auto approving/merging these kinds. of changes?
I'm just curious since I didn't see a change on the dependabot config limiting this to minor/patch changes oh and automerge config.

@chrisgilmerproj
Copy link
Author

I wanna make sure I. understand what this is doing... if depndabot submits a PR this workflow will trigger. in the workflow, it'll check out thecode. setup go and run go mod tidy then check it back in?

So this will have a tidy version of the module version changes that dependabot suggests?

Did y'all run into any issues auto approving/merging these kinds. of changes?
I'm just curious since I didn't see a change on the dependabot config limiting this to minor/patch changes oh and automerge config.

Yeah, it essentially does some cleanup which dependabot doesn't do. And it should auto-merge if everything goes right, meaning no humans need to be involved. I really want to do some more testing with this as well but it may requires some updates.

The impetus for this is that the repo had two outstanding dependabot changes that hadn't been handled. All it needs is an auto-approve step and then it would do this work for us without our interference. The only problems MilMove ever had was when a library got modified that caused client side integration tests to fail. For unit testing it seemed to be fine. Plus, this has a much smaller surface area than MilMove so I'm pretty confident it will work.

Copy link
Contributor

@eeeady eeeady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool thank you for confirming my understanding. You definitely need the change to .dependabot/config.yml then. It doesn't have any automerge stanzas. Just add that and I'll give it the 👍

@chrisgilmerproj
Copy link
Author

Cool thank you for confirming my understanding. You definitely need the change to .dependabot/config.yml then. It doesn't have any automerge stanzas. Just add that and I'll give it the 👍

Yeah, can't believe I missed that. It's in now.

Copy link
Contributor

@eeeady eeeady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@chrisgilmerproj chrisgilmerproj merged commit 2cc6d0f into master Jun 29, 2020
@chrisgilmerproj chrisgilmerproj deleted the cg_dependabot_auto_approve branch June 29, 2020 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants