Skip to content
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

Create a PR automatically after rustfmt #520

Merged
merged 1 commit into from
May 17, 2021
Merged

Conversation

kazk
Copy link
Member

@kazk kazk commented May 17, 2021

Uses peter-evans/create-pull-request to create a PR when running rustfmt changes any files after push to master.

  • Doesn't require extra privilege unlike pushing to a protected branch (Automate cargo +nightly fmt on push #506 (comment))
  • Closes and deletes automatically when the PR becomes unnecessary
  • Created PR does not trigger new workflows, but it should be fine because it's only formatting changes. Tests should run after merging it.

Uses [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
to create a PR when running `rustfmt` changes any files after push to
`master`.

- Doesn't require extra privilege unlike pushing to a protected branch
- Closes and deletes automatically when the PR becomes unnecessary
- Created PR does not trigger new workflows, but it should be fine
  because it's only formatting changes
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

Looks great 👍

@kazk
Copy link
Member Author

kazk commented May 17, 2021

Cool, merging this before #519 should create a PR. We can keep the PR open, and test if merging #519 closes the created PR because that contains a fix.

@kazk kazk merged commit eb45439 into kube-rs:master May 17, 2021
@kazk kazk deleted the rustfmt-pr branch May 17, 2021 22:35
@kazk
Copy link
Member Author

kazk commented May 17, 2021

OK, #521 was created. Any pushes to master should rerun the action and update the PR. We can keep that open and see if merging #519 with the same fix closes #521.

@clux
Copy link
Member

clux commented May 18, 2021

Took it a minute, and it tried to force-push first, but it closed it \o/

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