diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ee2226897c..b9741f43a6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,7 +19,8 @@ on: SENTRY_URL: required: true env: - # This must be set for fetchdep.sh to get the right branch + # These must be set for fetchdep.sh to get the right branch + REPOSITORY: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} jobs: build: diff --git a/.github/workflows/build_develop.yaml b/.github/workflows/build_develop.yaml index 8f273622bc..561da00a28 100644 --- a/.github/workflows/build_develop.yaml +++ b/.github/workflows/build_develop.yaml @@ -6,9 +6,6 @@ on: branches: [ develop ] repository_dispatch: types: [ element-web-notify ] -env: - # This must be set for fetchdep.sh to get the right branch - PR_NUMBER: ${{ github.event.pull_request.number }} jobs: build: name: "Build" diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index 98a59a1eeb..4323efdcc4 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -6,7 +6,8 @@ on: repository_dispatch: types: [ element-web-notify ] env: - # This must be set for fetchdep.sh to get the right branch + # These must be set for fetchdep.sh to get the right branch + REPOSITORY: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} jobs: ts_lint: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 53e82b21d8..b2dfa627cc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,7 +6,8 @@ on: repository_dispatch: types: [ element-web-notify ] env: - # This must be set for fetchdep.sh to get the right branch + # These must be set for fetchdep.sh to get the right branch + REPOSITORY: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} jobs: test: diff --git a/scripts/fetchdep.sh b/scripts/fetchdep.sh index 9091a2bacd..afe9267189 100755 --- a/scripts/fetchdep.sh +++ b/scripts/fetchdep.sh @@ -29,7 +29,7 @@ getPRInfo() { if [ -n "$number" ]; then echo "Getting info about a PR with number $number" - apiEndpoint="https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/" + apiEndpoint="https://api.github.com/repos/${REPOSITORY:-"vector-im/element-web"}/pulls/" apiEndpoint+=$number head=$(curl $apiEndpoint | jq -r '.head.label')