Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
tools: add script to lint first PR commit message#24030
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
nodejs-github-bot commented Nov 2, 2018
richardlau commented Nov 2, 2018
Examples: Run locally, no pull request specified (script works out based on current HEAD commit): Checking a completely different PR: On Travis (for this PR), https://travis-ci.com/nodejs/node/jobs/155889224: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Decouple first commit in pull request linting from Travis by using the GitHub API to work out the first commit. The shell script obtains the pull request number in one of the following ways: 1) supplied on the command line (use this to test against any PR) 2) derived from the HEAD commit via the GitHub API
826115e to 38f2b1eComparerichardlau commented Nov 2, 2018
Moved the Travis specific stuff out of the script back into |
richardlau commented Nov 2, 2018
Longer term we could teach
and then replace the shell script here with a direct call to |
Trott commented Nov 4, 2018
Decouple first commit in pull request linting from Travis by using the GitHub API to work out the first commit. The shell script obtains the pull request number in one of the following ways: 1) supplied on the command line (use this to test against any PR) 2) derived from the HEAD commit via the GitHub API PR-URL: nodejs#24030 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Trott commented Nov 4, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Landed in 7489ee8 |
addaleax commented Nov 4, 2018
@Trott@richardlau This seems to have broken Travis CI for non-PR branches without |
Do not run any linting at all when `TRAVIS_PULL_REQUEST` is `false`. This would otherwise break Travis CI for `master` and release branches. Refs: nodejs#24030
Do not run any linting at all when `TRAVIS_PULL_REQUEST` is `false`. This would otherwise break Travis CI for `master` and release branches. Refs: nodejs#24030 PR-URL: nodejs#24076 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Decouple first commit in pull request linting from Travis by using the GitHub API to work out the first commit. The shell script obtains the pull request number in one of the following ways: 1) supplied on the command line (use this to test against any PR) 2) derived from the HEAD commit via the GitHub API PR-URL: #24030 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Do not run any linting at all when `TRAVIS_PULL_REQUEST` is `false`. This would otherwise break Travis CI for `master` and release branches. Refs: #24030 PR-URL: #24076 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Decouple first commit in pull request linting from Travis by using the GitHub API to work out the first commit. The shell script obtains the pull request number in one of the following ways: 1) supplied on the command line (use this to test against any PR) 2) derived from the HEAD commit via the GitHub API PR-URL: #24030 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Do not run any linting at all when `TRAVIS_PULL_REQUEST` is `false`. This would otherwise break Travis CI for `master` and release branches. Refs: #24030 PR-URL: #24076 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Decouple first commit in pull request linting from Travis by using the GitHub API to work out the first commit. The shell script obtains the pull request number in one of the following ways: 1) supplied on the command line (use this to test against any PR) 2) derived from the HEAD commit via the GitHub API PR-URL: #24030 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Do not run any linting at all when `TRAVIS_PULL_REQUEST` is `false`. This would otherwise break Travis CI for `master` and release branches. Refs: #24030 PR-URL: #24076 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Decouple first commit in pull request linting from Travis by using the GitHub API to work out the first commit. The shell script obtains the pull request number in one of the following ways: 1) supplied on the command line (use this to test against any PR) 2) derived from the HEAD commit via the GitHub API PR-URL: #24030 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Do not run any linting at all when `TRAVIS_PULL_REQUEST` is `false`. This would otherwise break Travis CI for `master` and release branches. Refs: #24030 PR-URL: #24076 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]>

Decouple first commit in pull request linting from Travis by using
the GitHub API to work out the first commit.
The shell script obtains the pull request number in one of the
following ways:
The GitHub API should be more consistent with the web UI in terms of finding
the first commit for a pull request.
This is an alternative to #23758 with the bonus that
you can run the script against any pull request number.
Checklist