diff --git a/.buildkite/run_linter.sh b/.buildkite/run_linter.sh index cceb90eb3..266a317b9 100755 --- a/.buildkite/run_linter.sh +++ b/.buildkite/run_linter.sh @@ -8,7 +8,7 @@ source .buildkite/publish/git-setup.sh init_python -if is_pr; then +if is_pr && ! is_fork; then echo "We're on PR, running autoformat" if ! make autoformat ; then echo "make autoformat ran with errors, exiting" diff --git a/.buildkite/run_notice_check.sh b/.buildkite/run_notice_check.sh index 497769987..1d88a2308 100755 --- a/.buildkite/run_notice_check.sh +++ b/.buildkite/run_notice_check.sh @@ -14,7 +14,7 @@ if [ -z "$(git status --porcelain | grep NOTICE.txt)" ]; then exit 0 else git --no-pager diff - if is_pr; then + if is_pr && ! is_fork; then export GH_TOKEN="$VAULT_GITHUB_TOKEN" git add NOTICE.txt diff --git a/.buildkite/shared.sh b/.buildkite/shared.sh index b3d463107..8fa959a6a 100644 --- a/.buildkite/shared.sh +++ b/.buildkite/shared.sh @@ -34,3 +34,11 @@ is_pr() { return 0 # true fi } + +is_fork() { + if [ "BUILDKITE_PULL_REQUEST_REPO" = "https://github.com/elastic/connectors.git"]; then + return 1 # false + else + return 0 # true + fi +}