Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Marchini <mmarchini@netflix.com>2021-06-10 21:58:06 +0300
committerMary Marchini <mmarchini@netflix.com>2021-06-10 22:21:28 +0300
commit52f8471b528187853a1a1924961a37768df21ae6 (patch)
treeca70de80f0f9f3ab267e504018406a3c375650bc /.github
parent1ae874e5af662fcae1634609aa4af72beda732e8 (diff)
build: fix commit-queue default branch
`github.repository.default_branch` is not a valid context variable, and GitHub doesn't have a context or environment variable containing the default branch. It does have `github.ref` and `$GITHUB_REF`, which contains the default branch _reference_ (as in `refs/heads/<branch>`), so we can use that and remove the `refs/heads/` prefix. PR-URL: https://github.com/nodejs/node/pull/38998 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/commit-queue.yml11
1 files changed, 6 insertions, 5 deletions
diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml
index 5cfb92d88f9..25b7ea5a8cc 100644
--- a/.github/workflows/commit-queue.yml
+++ b/.github/workflows/commit-queue.yml
@@ -45,6 +45,7 @@ jobs:
run: |
echo "REPOSITORY=$(echo ${{ github.repository }} | cut -d/ -f2)" >> $GITHUB_ENV
echo "OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV
+ echo "DEFAULT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Get Pull Requests
uses: octokit/graphql-action@v2.x
@@ -63,19 +64,19 @@ jobs:
owner: ${{ env.OWNER }}
repo: ${{ env.REPOSITORY }}
# Commit queue is only enabled for the default branch on the repository
- base_ref: ${{ github.repository.default_branch }}
+ base_ref: ${{ env.DEFAULT_BRANCH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure node-core-utils
run: |
- ncu-config set branch ${{ github.repository.default_branch }}
+ ncu-config set branch ${DEFAULT_BRANCH}
ncu-config set upstream origin
ncu-config set username "${{ secrets.GH_USER_NAME }}"
ncu-config set token "${{ secrets.GH_USER_TOKEN }}"
ncu-config set jenkins_token "${{ secrets.JENKINS_TOKEN }}"
- ncu-config set repo "${{ env.REPOSITORY }}"
- ncu-config set owner "${{ env.OWNER }}"
+ ncu-config set repo "${REPOSITORY}"
+ ncu-config set owner "${OWNER}"
- name: Start the commit queue
- run: ./tools/actions/commit-queue.sh ${{ env.OWNER }} ${{ env.REPOSITORY }} ${{ secrets.GITHUB_TOKEN }} $(echo '${{ steps.get_mergable_pull_requests.outputs.data }}' | jq '.repository.pullRequests.nodes | map(.number) | .[]')
+ run: ./tools/actions/commit-queue.sh ${OWNER} ${REPOSITORY} ${{ secrets.GITHUB_TOKEN }} $(echo '${{ steps.get_mergable_pull_requests.outputs.data }}' | jq '.repository.pullRequests.nodes | map(.number) | .[]')