Skip to content

Commit bfcce18

Browse files
chmouelpiyush-garg
authored andcommitted
Really fix not linting merge commits
It was silly of me to not test this properly. The merge commit should be ignored.
1 parent 9aead6b commit bfcce18

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.tekton/linter.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,9 @@ spec:
6565
image: jorisroovers/gitlint
6666
workingDir: $(workspaces.source.path)
6767
script: |
68-
set -x
6968
git config --global --add safe.directory /workspace/source
70-
# don't lint merge commit
71-
git log -1 |grep -E -q '^Merge:' && exit 0
69+
git log -1 --format=format:%s |grep -E -q '^Merge branch' && exit 0
7270
gitlint --commit "$(git log --format=format:%H --no-merges -1)" --ignore "Merge branch"
73-
7471
- name: yamllint
7572
generateName: "YAML Linter"
7673
runAfter:

0 commit comments

Comments
 (0)