You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if there is something we can borrow from scripts/Tools/patchcheck.py for this? That way we can keep it entirely on Travis. Maybe add a --travis file to patchcheck that only does the whitespace checks?
Otherwise I'm thinking that to solve this we may want to provide an endpoint on Bedevere that returns the list of files in a PR as a JSON list of strings. We then have a script in Tools/scripts/ that will call Bedevere for the file list based on TRAVIS_PULL_REQUEST (and a secret to validate the caller), and then run the appropriate scripts much like https://hg.python.org/hooks/file/tip/checkwhitespace.py. Then the return value of the script will flag whether a PR has any whitespace that needs normalization.
Activity
brettcannon commentedon Dec 10, 2016
Looks like there is a GitHub API for getting files involved in a PR. Probably can't query GitHub w/o authentication, else you run the risk of reaching their quota.
brettcannon commentedon Jun 23, 2017
I wonder if there is something we can borrow from
scripts/Tools/patchcheck.pyfor this? That way we can keep it entirely on Travis. Maybe add a--travisfile to patchcheck that only does the whitespace checks?Otherwise I'm thinking that to solve this we may want to provide an endpoint on Bedevere that returns the list of files in a PR as a JSON list of strings. We then have a script in
Tools/scripts/that will call Bedevere for the file list based onTRAVIS_PULL_REQUEST(and a secret to validate the caller), and then run the appropriate scripts much like https://hg.python.org/hooks/file/tip/checkwhitespace.py. Then the return value of the script will flag whether a PR has any whitespace that needs normalization.