Skip to content

Commit 9256856

Browse files
authored
Merge branch '2.0.x' into #5974/restart_action_doesnt_run_session_start
2 parents 62112fe + a9dc4df commit 9256856

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.github/workflows/continous-integration.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@ jobs:
9999
- name: Checkout target branch to be able to diff
100100
if: github.event_name == 'pull_request'
101101
run: |
102-
git fetch --depth=1 origin ${{ github.base_ref }}
102+
git fetch origin ${{ github.base_ref }}
103103
echo "DOCSTRING_DIFF_BRANCH=origin/${{ github.base_ref }}" >> $GITHUB_ENV
104104
105+
# Fetch entire history for current branch so that `make lint-docstrings`
106+
# can calculate the proper diff between the branches
107+
git pull --ff-only --unshallow origin ${{ github.head_ref }}
108+
105109
- name: Lint Code 🎎
106110
run: |
107111
# If it's not a pull request, $DOCSTRING_DIFF_BRANCH is unset.

Makefile

+9-7
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@ lint:
6666
poetry run black --check rasa tests
6767
make lint-docstrings
6868

69-
BRANCH ?= master # Compare against `master` if no branch was provided
69+
# Compare against `master` if no branch was provided
70+
BRANCH ?= master
7071
lint-docstrings:
71-
# Lint docstrings only against the the diff to avoid too many errors.
72-
# Check only production code. Ignore other flake errors which are captured by `lint`
73-
# Diff of committed changes (shows only changes introduced by your branch)
74-
if [[ -n "$(BRANCH)" ]]; then \
75-
git diff $(BRANCH)...HEAD -- rasa | poetry run flake8 --select D --diff; \
76-
fi
72+
# Lint docstrings only against the the diff to avoid too many errors.
73+
# Check only production code. Ignore other flake errors which are captured by `lint`
74+
# Diff of committed changes (shows only changes introduced by your branch
75+
ifneq ($(strip $(BRANCH)),)
76+
git diff $(BRANCH)...HEAD -- rasa | poetry run flake8 --select D --diff
77+
endif
78+
7779
# Diff of uncommitted changes for running locally
7880
git diff HEAD -- rasa | poetry run flake8 --select D --diff
7981

0 commit comments

Comments
 (0)