Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Get Pull Request ID by branch name or commit hash #190
haya14busa left a comment
This is breaking changes and I'm wondering what should we do.
@reviewdog/reviewdog Do you have any thought?
Maybe we can document this change and the user can suppress reviewdog on commit build?
I think it is the CI's issue. You should send a feature request to vexor.io first.
As haya14busa say, this feature is a breaking change. So it should be opt-in feature, and enabled by an environment value (e.g.
Sry for the late reply. I should have left comments earlier.
I don't like the idea to change the behavior by an environment variable. Environment variables should be used for passing API key, CI "environment" variable (like commit, pr-number, etc... in CI services) and configuration which doesn't change the behavior but changing target or something (e.g. GITHUB_API base endpoint).
Let's use the command-line flag instead. Also, as mattn said, reviewdog should exit with non-zero exit code if the user explicitly specifies the flag and couldn't find the p-r.
About exiting with a non-zero code. I don't think that it's a good idea because CI-services create not only PR-builds. Thus, tests will always fail for these builds.
I think reviewdog shouldn't do anything if it doesn't find Pull Request ID by the branch name and the commit SHA. And it should exit with the zero code.