diff --git a/.github/workflows/do-not-merge.yml b/.github/workflows/do-not-merge.yml index 49170e8ed..5ef6172ae 100644 --- a/.github/workflows/do-not-merge.yml +++ b/.github/workflows/do-not-merge.yml @@ -4,6 +4,7 @@ on: types: - labeled - unlabeled + workflow_call: permissions: pull-requests: read diff --git a/.github/workflows/fallback-pr-create.yml b/.github/workflows/fallback-pr-create.yml new file mode 100644 index 000000000..b6766535e --- /dev/null +++ b/.github/workflows/fallback-pr-create.yml @@ -0,0 +1,26 @@ +name: Fallback pr create +on: + pull_request: + pull_request_review: + pull_request_review_comment: + +jobs: + get-statusCheckRollup: + runs-on: ubuntu-22.04 + outputs: + status: ${{ steps.step1.outputs.status }} + steps: + - 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