59392066c4
main: add support for github actions
...
Fixes #48
now with logic to detect GITHUB_SHA env variable, let's do a run without
the `-range` flag so that path lights up.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2021-05-14 14:17:58 -04:00
00823a324b
message_regexp: regular expression rule for messages
...
Fixes : #30
now you can add a regular expression to the rules to be run
i.e. `git-validation -run "dco,message_regexp='^JIRA-[0-9]+ [A-Z].*$'"`
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-10-09 16:07:40 -04:00
56ef622e37
travis: only run the git-validation on pull-requests
...
Fixes #24
https://docs.travis-ci.com/user/pull-requests/
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-27 13:59:55 -04:00
W. Trevor King
f94dce37d6
main: Fix strings.Replace argument order
...
It's (string, old, new, n), not (old, new, string, n) [1]. Fixes a
typo I'd introduced in cdd7165
(main: Return to using
TRAVIS_COMMIT_RANGE (with ... -> .. fix), 2017-03-21, #17 ).
[1]: https://golang.org/pkg/strings/#Replace
Signed-off-by: W. Trevor King <wking@tremily.us>
2017-03-21 15:07:53 -07:00
W. Trevor King
cdd7165f80
main: Return to using TRAVIS_COMMIT_RANGE (with ... -> .. fix)
...
Master builds only have a 'git clone ...' [1] so FETCH_HEAD isn't
defined and git-validation crashes [2]. This commit partially reverts
8a12a8fc
(main: default travis commit range is unreliable, 2017-03-21,
#13 ) to avoid that crash. If TRAVIS_COMMIT_RANGE is unset [3],
falling back to TRAVIS_COMMIT may be fine.
The ... -> .. replacement works around travis-ci/travis-ci#4596 until
that is fixed upstream [4]. This avoids pulling in commits from the
base tip that aren't reachable from the head tip (e.g. if master has
advanced since the PR branched off, and the PR is against master). We
only want to check commits that are in the head branch but not in the
base branch (more details on the range syntax in [5]).
Once the Travis bug does get fixed, the shell replacement will be a
no-op. So we don't have to worry about checks breaking once the bug
gets fixed, and can periodically poll the bug and remove the
workaround at out leisure after the fix.
[1]: https://travis-ci.org/opencontainers/runc/jobs/213508696#L243
[2]: https://travis-ci.org/opencontainers/runc/jobs/213508696#L347
[3]: https://github.com/opencontainers/runc/pull/1378#issuecomment-287903471
[4]: https://github.com/travis-ci/travis-ci/issues/4596
[5]: http://git-scm.com/docs/gitrevisions#_specifying_ranges
Signed-off-by: W. Trevor King <wking@tremily.us>
2017-03-21 12:16:01 -07:00
8a12a8fc7a
main: default travis commit range is unreliable
...
https://github.com/opencontainers/runc/pull/1378#issuecomment-287920287
points to an alternate approach.
Reported-by: Mrunal Patel <mrunalp@gmail.com>
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-03-21 09:41:59 -04:00
W. Trevor King
0e135a4759
main: Explicit -range implies -no-travis
...
If someone went through the trouble to set -range, they probably don't
want you clobbering their value with something from a TRAVIS_*
environment variable.
2017-01-26 21:13:02 -08:00
3bad322461
main: add a bit of output to -q
...
ideally `-q` would be only return code of 0 or non-zero, but it already
had some output. This adds only failed tests per commit.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-05-03 15:22:57 -04:00
8193a24bc4
dangling-whitespace: rule for trailing spaces
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-04-05 15:28:39 -04:00
e3ba588c3a
travis: adding checks for basic regressions
...
* go vet
* golint
* whether the tool builds
* tests (there are none yet)
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-04-05 15:28:38 -04:00
769b4028a4
main: adding a quiet flag to reduce the output
...
so you can test and just check return code
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-01-14 10:29:35 -05:00
d614ccf997
*: run tests in a runner
...
for cleanliness and ease of testing
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-10-06 10:44:04 -04:00
b9413c60c8
shortsubject: add a subject length check
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-10-05 19:02:31 -04:00
5e74abd1b2
*: comments and golint
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-10-05 18:55:05 -04:00
07a982ff94
git: add verbose output of the commands run
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-10-05 18:49:06 -04:00
03bda4bcb2
main: add filtering of rules to run
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-10-05 18:49:02 -04:00
c10ba9c097
Initial commit
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-10-05 18:48:23 -04:00