From 3db0b11e4ef9538bc485cb580825ae28006480c8 Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Tue, 14 Mar 2023 16:51:05 +0900 Subject: [PATCH] test --- .github/workflows/do-not-merge.yml | 1 + .github/workflows/fallback-pr-create.yml | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/do-not-merge.yml b/.github/workflows/do-not-merge.yml index 703d9daf..2775b6eb 100644 --- a/.github/workflows/do-not-merge.yml +++ b/.github/workflows/do-not-merge.yml @@ -5,6 +5,7 @@ on: - opened - labeled - unlabeled + workflow_call: permissions: pull-requests: read diff --git a/.github/workflows/fallback-pr-create.yml b/.github/workflows/fallback-pr-create.yml index 984d6e48..b6766535 100644 --- a/.github/workflows/fallback-pr-create.yml +++ b/.github/workflows/fallback-pr-create.yml @@ -1,14 +1,26 @@ name: Fallback pr create on: pull_request: - issue_comment: pull_request_review: pull_request_review_comment: jobs: - approved: - name: '!!!' - if: ${{ !github.event.issue || github.event.issue.pull_request }} + get-statusCheckRollup: runs-on: ubuntu-22.04 + outputs: + status: ${{ steps.step1.outputs.status }} steps: - - run: "true" + - id: set-statusCheckRollup + run: echo "status=${{ toJSON(${gh pr view 215 --json statusCheckRollup -q '.statusCheckRollup[].name'}) }}" >> "$GITHUB_OUTPUT" + pr: + name: 'pr' + needs: get-statusCheckRollup + runs-on: ubuntu-22.04 + steps: + - name: check_do-not-merge + run: | + echo "${{ needs.get-statusCheckRollup }}" + if ${{ !contains(fromJSON(needs.get-statusCheckRollup), '') }}; then + true + - name: do-not-merge + uses: ./github/workflows/do-not-merge.yml \ No newline at end of file