Skip to content

Commit

Permalink
only trigger automerge script for ==True
Browse files Browse the repository at this point in the history
  • Loading branch information
Katherine Fairchild committed Nov 29, 2023
1 parent e92ea51 commit 1244dbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/travis_trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

GH_WORKFLOW_TRIGGER=$1
TRAVIS_PULL_REQUEST_SHA=$2
PLUGIN_ONLY=$3

curl -L -X POST \
-H "Authorization: token $GH_WORKFLOW_TRIGGER" \
-d '{"state": "success", "description": "Run automerge workflow - '$PLUGIN_ONLY'",
-d '{"state": "success", "description": "Run automerge workflow for plugin-only PR",
"context": "continuous-integration/travis"}' \
"https://api.github.com/repos/brain-score/language/statuses/$TRAVIS_PULL_REQUEST_SHA"
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
CHANGED_FILES=$( git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch && echo $(git diff --name-only origin/$TRAVIS_PULL_REQUEST_BRANCH origin/$TRAVIS_BRANCH -C $TRAVIS_BUILD_DIR) | tr '\n' ' ' ) &&
PLUGIN_ONLY=$( python -c "from brainscore_core.plugin_management.parse_plugin_changes import is_plugin_only; is_plugin_only(\"${CHANGED_FILES}\", 'brainscore_language')" )
fi
- if [ "$PLUGIN_ONLY" = "True" ]; then bash ${TRAVIS_BUILD_DIR}/.github/workflows/travis_trigger.sh $GH_WORKFLOW_TRIGGER $TRAVIS_PULL_REQUEST_SHA $PLUGIN_ONLY; fi
- if [ "$PLUGIN_ONLY" = "True" ]; then bash ${TRAVIS_BUILD_DIR}/.github/workflows/travis_trigger.sh $GH_WORKFLOW_TRIGGER $TRAVIS_PULL_REQUEST_SHA; fi

0 comments on commit 1244dbe

Please sign in to comment.