write code to import PRs from github and/or forgejo #22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We need to be able to import PR-shaped contributions from GitHub and forgejo. These would be strongly discouraged for larger changes requiring multiple commits, since the only way to maintain consistent state is that the entire PR is squashed into one CL.
This was planned verbally for a long while but didn't get written down and I am submitting this to make sure we remember this, since it is rather important for our release situation. It would be OK if it is initially manual but this needs to be automated eventually.
This process will exist to make smaller and one-off changes (that are already cheap review-wise) low-friction, while retaining the more-appropriate balance of contributor friction vs review friction of gerrit on larger changes.
I agree that this is important.
https://go.dev/wiki/GerritBot
we could take this, but we'd have to make it also take from forgejo. probably wouldn't be that bad though.
f7368271cf/internal/ci
see also: https://github.com/golang/go/discussions/61182 https://github.com/golang/go/issues/21956#issuecomment-331353818
we definitely need to make small/medium changes still easy and accept those via gh/fj but large changes just have to go through Gerrit by some means in our::jade view.
it's possible to either import on accept or import on receive. import on accept is better for contributors who aren't using gerrit but requires review on GitHub/forgejo. import on receive is incredibly janky especially with respect to revisions over time, and in spite of go bot improvements is still forced to be somewhat jank by how it is.
We have deferred actually doing anything at all about this until we receive PRs with any frequency. So far we have received (1), and I just cherry picked it into gerrit by hand.
We investigated the gerrit github plugin and we found that it creates one CL per commit, which is a non-starter for the commit unhygiene culture of GitHub, so we are rejecting that option. See: https://gerrit.googlesource.com/plugins/github/+/refs/heads/master/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestImportJob.java