forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: heuristically skip proto and Python format checks. (envoyproxy…
…#10490) * tools: heuristically skip proto and Python format checks. This patch introduces a conservative heuristic to allow us to skip the time consuming proto and Python format checks. It does this by looking back to the last commit in the history introduced by GitHub, and if no relevant .proto or .py is present, skipping the respective check. The heuristic is conservative; a .proto may have been introduced, formatted and thus a redundant format occurs. Still, this should save many developer cycles waiting when their PRs have nothing to do with APIs or Python. Risk level: Low (developer tooling only) Testing: manual Fixes envoyproxy#10340 Signed-off-by: Harvey Tuch <[email protected]>
- Loading branch information
Showing
6 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Looking back from HEAD, find the first commit that was merged onto master by GitHub. This is | ||
# likely the last non-local change on a given branch. There may be some exceptions for this | ||
# heuristic, e.g. when patches are manually merged for security fixes on master, but this is very | ||
# rare. | ||
|
||
git rev-list --no-merges --committer="GitHub <[email protected]>" --max-count=1 HEAD |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
declare -r BASE="$(dirname "$0")" | ||
declare -r TARGET_PATH=$1 | ||
declare -r EXTENSION=$2 | ||
|
||
git diff --name-only $("${BASE}"/last_github_commit.sh)..HEAD | grep "\.${EXTENSION}$" |
This file contains 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