| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,40 +28,17 @@ jobs: | |||
| 28 | 28 | - name: Install node-core-utils | |
| 29 | 29 | run: npm install -g node-core-utils | |
| 30 | 30 | ||
| 31 | - - name: Set variables | ||
| 32 | - run: | | ||
| 33 | - echo "REPOSITORY=$(echo ${{ github.repository }} | cut -d/ -f2)" >> $GITHUB_ENV | ||
| 34 | - echo "OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV | ||
| 35 | - | ||
| 36 | - # Get Pull Requests | ||
| 37 | - - name: Get Pull Requests | ||
| 38 | - uses: octokit/graphql-action@v2.x | ||
| 39 | - id: get_prs_for_ci | ||
| 40 | - with: | ||
| 41 | - query: | | ||
| 42 | - query prs($owner:String!, $repo:String!) { | ||
| 43 | - repository(owner:$owner, name:$repo) { | ||
| 44 | - pullRequests(labels: ["request-ci"], states: OPEN, last: 100) { | ||
| 45 | - nodes { | ||
| 46 | - number | ||
| 47 | - } | ||
| 48 | - } | ||
| 49 | - } | ||
| 50 | - } | ||
| 51 | - owner: ${{ env.OWNER }} | ||
| 52 | - repo: ${{ env.REPOSITORY }} | ||
| 53 | - env: | ||
| 54 | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| 55 | - | ||
| 56 | 31 | - name: Setup node-core-utils | |
| 57 | 32 | run: | | |
| 58 | 33 | ncu-config set username ${{ secrets.JENKINS_USER }} | |
| 59 | 34 | ncu-config set token none | |
| 60 | 35 | ncu-config set jenkins_token ${{ secrets.JENKINS_TOKEN }} | |
| 61 | - ncu-config set owner ${{ env.OWNER }} | ||
| 62 | - ncu-config set repo ${{ env.REPOSITORY }} | ||
| 36 | + ncu-config set owner "${{ github.repository_owner }}" | ||
| 37 | + ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)" | ||
| 63 | 38 | ||
| 64 | - - name: Start CI | ||
| 65 | - run: ./tools/actions/start-ci.sh $(echo '${{ steps.get_prs_for_ci.outputs.data }}' | jq '.repository.pullRequests.nodes | map(.number) | .[]') | ||
| 39 | + - name: Start the CI | ||
| 40 | + run: | | ||
| 41 | + PRs=$(gh pr list --label 'request-ci' --json number --jq 'map(.number) | .[]' --limit 100) | ||
| 42 | + ./tools/actions/start-ci.sh "$PRs" | ||
| 66 | 43 | env: | |
| 67 | 44 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,12 +12,9 @@ jobs: | |||
| 12 | 12 | steps: | |
| 13 | 13 | - name: Post stalled comment | |
| 14 | 14 | env: | |
| 15 | - COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }} | ||
| 16 | - run: | | ||
| 17 | - curl -X POST $COMMENTS_URL \ | ||
| 18 | - -H "Content-Type: application/json" \ | ||
| 19 | - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
| 20 | - --data '{ "body": "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." }' | ||
| 15 | + NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }} | ||
| 16 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| 17 | + run: gh pr comment "$NUMBER" --repo ${{ github.repository }} --body "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." | ||
| 21 | 18 | ||
| 22 | 19 | fastTrack: | |
| 23 | 20 | if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,27 +46,6 @@ jobs: | |||
| 46 | 46 | echo "OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV | |
| 47 | 47 | echo "DEFAULT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
| 48 | 48 | ||
| 49 | - - name: Get Pull Requests | ||
| 50 | - uses: octokit/graphql-action@v2.x | ||
| 51 | - id: get_mergable_pull_requests | ||
| 52 | - with: | ||
| 53 | - query: | | ||
| 54 | - query release($owner:String!,$repo:String!, $base_ref:String!) { | ||
| 55 | - repository(owner:$owner, name:$repo) { | ||
| 56 | - pullRequests(baseRefName: $base_ref, labels: ["commit-queue"], states: OPEN, last: 100) { | ||
| 57 | - nodes { | ||
| 58 | - number | ||
| 59 | - } | ||
| 60 | - } | ||
| 61 | - } | ||
| 62 | - } | ||
| 63 | - owner: ${{ env.OWNER }} | ||
| 64 | - repo: ${{ env.REPOSITORY }} | ||
| 65 | - # Commit queue is only enabled for the default branch on the repository | ||
| 66 | - base_ref: ${{ env.DEFAULT_BRANCH }} | ||
| 67 | - env: | ||
| 68 | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| 69 | - | ||
| 70 | 49 | - name: Configure node-core-utils | |
| 71 | 50 | run: | | |
| 72 | 51 | ncu-config set branch ${DEFAULT_BRANCH} | |
@@ -77,7 +56,13 @@ jobs: | |||
| 77 | 56 | ncu-config set repo "${REPOSITORY}" | |
| 78 | 57 | ncu-config set owner "${OWNER}" | |
| 79 | 58 | ||
| 80 | - - name: Start the commit queue | ||
| 81 | - run: ./tools/actions/commit-queue.sh ${OWNER} ${REPOSITORY} $(echo '${{ steps.get_mergable_pull_requests.outputs.data }}' | jq '.repository.pullRequests.nodes | map(.number) | .[]') | ||
| 59 | + - name: Start the Commit Queue | ||
| 60 | + run: | | ||
| 61 | + PRs=$(gh pr list \ | ||
| 62 | + --base ${{ env.DEFAULT_BRANCH }} \ | ||
| 63 | + --label 'commit-queue' \ | ||
| 64 | + --json number --jq 'map(.number) | .[]' \ | ||
| 65 | + --limit 100) | ||
| 66 | + ./tools/actions/commit-queue.sh ${{ env.OWNER }} ${{ env.REPOSITORY }} "$PRs" | ||
| 82 | 67 | env: | |
| 83 | 68 | GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} | |
| Back | FazBrowse Home | New Git URL |
0 commit comments