Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d93c140

Browse filesBrowse files
committed
Fix Circle merge on master branch.
There exists a PR on a random fork, which fills in `CI_PULL_REQUEST`, which we don't want to use as merge target when building `master`. Instead, check `CIRCLE_PR_NUMBER`, which is set only on forked PRs. Also, check branch name (which is current, not the _target_) to be certain.
1 parent dea6221 commit d93c140
Copy full SHA for d93c140

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎.circleci/config.yml

Copy file name to clipboardExpand all lines: .circleci/config.yml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ commands:
3131
git remote add upstream git://github.com/matplotlib/matplotlib.git
3232
fi
3333
git fetch upstream
34-
export merge=${CI_PULL_REQUEST//*pull\//}
35-
if [[ "$merge" != "" ]]; then
36-
echo "Merging ${merge}";
37-
git pull --ff-only upstream "refs/pull/${merge}/merge";
34+
if [[ "$CIRCLE_BRANCH" != "master" ]] && \
35+
[[ "$CIRCLE_PR_NUMBER" != "" ]]; then
36+
echo "Merging ${CIRCLE_PR_NUMBER}"
37+
git pull --ff-only upstream "refs/pull/${CIRCLE_PR_NUMBER}/merge"
3838
fi
3939
4040
apt-install:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.