File tree 1 file changed +7
-3
lines changed
packages/conventional-changelog-lint/scripts
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 3
3
set -u
4
4
5
5
# Add the clone as remote if this is a PR from a clone
6
- if [ $TRAVIS_PULL_REQUEST_SLUG != " " ] && [ $TRAVIS_PULL_REQUEST_SLUG != $TRAVIS_REPO_SLUG ]; then
6
+ if [[ $TRAVIS_PULL_REQUEST_SLUG != " " && $TRAVIS_PULL_REQUEST_SLUG != $TRAVIS_REPO_SLUG ] ]; then
7
7
git remote add " $TRAVIS_PULL_REQUEST_SLUG " " https://github.com/$TRAVIS_PULL_REQUEST_SLUG .git"
8
8
git fetch " $TRAVIS_PULL_REQUEST_SLUG "
9
9
fi
10
10
11
11
# Use REMOTE/BRANCH as comparison if applicable
12
- if [ $TRAVIS_PULL_REQUEST_SLUG != " " ]; then
12
+ if [[ $TRAVIS_PULL_REQUEST_SLUG != " " ] ]; then
13
13
TO=" $TRAVIS_PULL_REQUEST_SLUG /$TRAVIS_PULL_REQUEST_BRANCH "
14
14
else
15
15
TO=" $TRAVIS_PULL_REQUEST_BRANCH "
16
16
fi
17
17
18
- conventional-changelog-lint --from=" $TRAVIS_BRANCH " --to=" $TO "
18
+ if [[ $TRAVIS_BRANCH == $TO ]]; then
19
+ conventional-changelog-lint --from=" HEAD~1"
20
+ else
21
+ conventional-changelog-lint --from=" $TRAVIS_BRANCH " --to=" $TO "
22
+ fi
You can’t perform that action at this time.
0 commit comments