-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add support for arbitrary git ref in check breaking #48
Comments
We can likely do that, however we'd probably want to keep the |
That makes sense, it also follows the principle of least astonishment for most users. |
Is there a workaround right now to compare an outstanding PR with the merge-base where it was created from? Maybe I need to create a temporary tag. :( |
FTR, here's the workaround I'm using:
|
FYI investigating this now, will update this issue when we have more information. We likely will still recommend the branch/tag options, as it lets use use effectively |
@fsommar @robsonmeemo is there anything preventing you from using the
Or is this not for GitHub? |
What does |
It's just an example. You can do this for commits as well:
Does this solve your problem? Perhaps we should update the documentation to point people to this if they want to do specific commits (the https/tarball method is also cheaper than git). |
We do not have https access to our private repo. We use ssh credentials and I don't think the tar.gz archives are supported in that scenario. |
OK - it should be easy to add, you just need either:
Secrets should be easy enough for GitHub Actions, Travis, and CircleCI https://github.com/bufbuild/buf-example https://buf.build/docs/inputs#authentication We can still work to add refs for git, but it's much less efficient than the tarball scanerio, I'd honestly recommend setting this up anyways. |
We were purposely not using secrets and giving the CI app limited access to our repo as a more secure solution. We'd also like to avoid fetching from github and just comparing against the ref in the local repo. |
OK fair enough. We'll keep this open and get a solution. |
I just wanted to mention that we are having a similar problem with integrating |
We will get to this soon, sorry for the delay. |
Sure! Thank you for the prompt answer, but I just wanted to add a data point. Let me know if there is something I can help with. |
General plan:
Regardless, split out submodule cloning into a separate command that comes after any potential checkout, using |
This is released as v0.17.0. The documentation at https://buf.build/docs/inputs#git has been updated as well. Let us know if you have any issues. |
The
buf check breaking
command has support for branches and tags when checking against a git repository input. I want it to accept an arbitrary git reference, likerefs/remotes/origin/master
orrefs/pull/3/head
.In my humble opinion, if you're not afraid of breaking backwards compatibility, it makes sense to remove branch and tag flags, since they're just a strict subset of providing the reference directly (and removing them would simplify some of the flag logic).
The text was updated successfully, but these errors were encountered: