File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 99 steps :
1010 - uses : actions/checkout@v1
1111 - run : sed -i -E "s/([']docker:.+)/Dockerfile/" ./action.yml
12- - run : echo -n "" > .dockerignore
12+ - run : echo -n '' > .dockerignore
1313 - uses : ./
1414 commitlint-with-yml-file :
1515 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ const configPath = resolve(
1818
1919const { context : eventContext } = github
2020
21- const gitEmptySha = '0000000000000000000000000000000000000000'
21+ const pushEventHasOnlyOneCommit = from => {
22+ const gitEmptySha = '0000000000000000000000000000000000000000'
23+
24+ return from === gitEmptySha
25+ }
2226
2327const getRangeForPushEvent = ( ) => {
2428 let from = eventContext . payload . before
@@ -32,7 +36,7 @@ const getRangeForPushEvent = () => {
3236 from = null
3337 }
3438
35- if ( from === gitEmptySha ) {
39+ if ( pushEventHasOnlyOneCommit ( from ) ) {
3640 from = null
3741 }
3842
@@ -58,7 +62,7 @@ const getRangeForEvent = async () => {
5862
5963function getHistoryCommits ( from , to ) {
6064 const options = {
61- from,
65+ from : from && ` ${ from } ^1` ,
6266 to,
6367 }
6468
You can’t perform that action at this time.
0 commit comments