Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Support forked PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jun 20, 2018
1 parent 40cc273 commit 50ba663
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .travis.yml
@@ -1,26 +1,23 @@
cache: yarn
language: node_js

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1
- export PATH=$HOME/.yarn/bin:$PATH
node_js: '8.4'

matrix:
include:
- node_js: '8.4'
script:
- yarn ci
- yarn danger ci --verbose
- env: NAME="CI"
script:
- yarn ci
- yarn danger ci --verbose

# Deployment related tasks
- node_js: "8.4.0"
script: "" # NOOP as we don't need to run tests etc
after_success: # This can never fail the build
- yarn relay
# Upload latest PR commit to S3
- test ! $TRAVIS_PULL_REQUEST == "false" && scripts/deploy_commit.sh
# Upload merges to master to apphub
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then scripts/deploy_master.sh; fi
# Deployment related tasks
- env: NAME="Deployment"
script: "" # NOOP as we don't need to run tests etc
after_success: # This can never fail the build
- yarn relay
# Upload latest PR commit to S3
- test ! $TRAVIS_PULL_REQUEST == "false" && scripts/deploy_commit.sh
# Upload merges to master to apphub
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" -z $APP_HUB_SECRET ]; then scripts/deploy_master.sh; fi

cache:
yarn: true
Expand Down
5 changes: 5 additions & 0 deletions dangerfile.ts
Expand Up @@ -37,6 +37,11 @@ const touchedComponents = touchedFiles.filter(p => includes(p, "src/lib/componen

// Rules

// If it's not a branch PR
if (pr.base.repo.full_name !== pr.head.repo.full_name) {
warn("This PR comes from a fork, and won't get JS generated for QA testing this PR inside the Emission Example app.")
}

// When there are app-changes and it's not a PR marked as trivial, expect
// there to be CHANGELOG changes.
const changelogChanges = includes(modified, "CHANGELOG.md")
Expand Down

0 comments on commit 50ba663

Please sign in to comment.