File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 9
9
steps :
10
10
- uses : actions/checkout@v1
11
11
- run : sed -i -E "s/([']docker:.+)/Dockerfile/" ./action.yml
12
- - run : echo -n "" > .dockerignore
12
+ - run : echo -n '' > .dockerignore
13
13
- uses : ./
14
14
commitlint-with-yml-file :
15
15
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ const configPath = resolve(
18
18
19
19
const { context : eventContext } = github
20
20
21
- const gitEmptySha = '0000000000000000000000000000000000000000'
21
+ const pushEventHasOnlyOneCommit = from => {
22
+ const gitEmptySha = '0000000000000000000000000000000000000000'
23
+
24
+ return from === gitEmptySha
25
+ }
22
26
23
27
const getRangeForPushEvent = ( ) => {
24
28
let from = eventContext . payload . before
@@ -32,7 +36,7 @@ const getRangeForPushEvent = () => {
32
36
from = null
33
37
}
34
38
35
- if ( from === gitEmptySha ) {
39
+ if ( pushEventHasOnlyOneCommit ( from ) ) {
36
40
from = null
37
41
}
38
42
@@ -58,7 +62,7 @@ const getRangeForEvent = async () => {
58
62
59
63
function getHistoryCommits ( from , to ) {
60
64
const options = {
61
- from,
65
+ from : from && ` ${ from } ^1` ,
62
66
to,
63
67
}
64
68
You can’t perform that action at this time.
0 commit comments