tools: add script to lint first PR commit message#24030
Closed
richardlau wants to merge 1 commit intonodejs:masterfrom
Closed
tools: add script to lint first PR commit message#24030richardlau wants to merge 1 commit intonodejs:masterfrom
richardlau wants to merge 1 commit intonodejs:masterfrom
Conversation
1 task
Member
Author
|
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: |
refack
reviewed
Nov 2, 2018
refack
reviewed
Nov 2, 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
826115e to
38f2b1e
Compare
Member
Author
|
Moved the Travis specific stuff out of the script back into |
Member
Author
|
Longer term we could teach
and then replace the shell script here with a direct call to |
refack
approved these changes
Nov 2, 2018
Trott
approved these changes
Nov 4, 2018
Member
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
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 <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Member
|
Landed in 7489ee8 |
Member
|
@Trott @richardlau This seems to have broken Travis CI for non-PR branches without |
addaleax
added a commit
to addaleax/node
that referenced
this pull request
Nov 4, 2018
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
2 tasks
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Nov 4, 2018
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 <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 5, 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: #24030 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 5, 2018
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 <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This was referenced Nov 15, 2018
This was referenced Nov 15, 2018
codebytere
pushed a commit
that referenced
this pull request
Nov 29, 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: #24030 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
codebytere
pushed a commit
that referenced
this pull request
Nov 29, 2018
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 <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Nov 29, 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: #24030 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Nov 29, 2018
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 <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Dec 3, 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: #24030 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 3, 2018
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 <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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