Skip to content

Commit

Permalink
Merge pull request #6997 from freedomofpress/fix-circleci-pr-conditio…
Browse files Browse the repository at this point in the history
…nals

ci: fix CircleCI conditionals for Weblate pull requests
  • Loading branch information
legoktm committed Oct 13, 2023
2 parents 109ee26 + a523260 commit e255538
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .circleci/config.yml
Expand Up @@ -227,6 +227,13 @@ jobs:
BASE_OS: focal
parallelism: 21
steps:
- run:
name: Only run on translation pull requests
command: |
if [ "$CIRCLE_PR_USERNAME" != "weblate-fpf" ]; then
circleci-agent step halt
fi
- checkout
- *rebaseontarget
- *createcachedir
Expand Down Expand Up @@ -452,9 +459,6 @@ workflows:
- translation-tests:
requires:
- lint
filters:
branches:
only: /weblate-.*/
context:
- circleci-slack
<<: *slack-fail-post-step
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -383,7 +383,7 @@ $(POT): securedrop
.PHONY: check-desktop-files
check-desktop-files: ${DESKTOP_BASE}/*.j2
@$(MAKE) --always-make --no-print-directory update-desktop-files
@git diff --quiet $^ || { echo "Desktop files are out of date. Please run \"make update-desktop-files\" and commit the changes."; exit 1; }
@git diff --quiet $^ || [[ "$$CIRCLE_PR_USERNAME" == "weblate-fpf" ]] || { echo "Desktop files are out of date. Please run \"make update-desktop-files\" and commit the changes."; exit 1; }

.PHONY: update-desktop-files
update-desktop-files: ${DESKTOP_BASE}/*.j2
Expand Down
1 change: 1 addition & 0 deletions securedrop/bin/dev-shell
Expand Up @@ -95,6 +95,7 @@ function docker_run() {
-e CIRCLECI=true \
-e CIRCLE_BRANCH=${CIRCLE_BRANCH:-} \
-e CIRCLE_SHA1=${CIRCLE_SHA1:-} \
-e CIRCLE_PR_USERNAME=${CIRCLE_PR_USERNAME:-} \
-e CIRCLE_PROJECT_REPONAME=${CIRCLE_PROJECT_REPONAME:-} \
-e CIRCLE_PROJECT_USERNAME=${CIRCLE_PROJECT_USERNAME:-} \
-e CIRCLE_REPOSITORY_URL=${CIRCLE_REPOSITORY_URL:-} \
Expand Down

0 comments on commit e255538

Please sign in to comment.