fix: automate mark as draft (#6730)
This commit is contained in:
parent
a85868ba7c
commit
e95bd6a6e0
@ -12,9 +12,6 @@ permissions: {}
|
|||||||
jobs:
|
jobs:
|
||||||
mark-draft:
|
mark-draft:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
contents: read
|
|
||||||
if: |
|
if: |
|
||||||
(
|
(
|
||||||
github.event_name == 'pull_request_review' &&
|
github.event_name == 'pull_request_review' &&
|
||||||
@ -27,7 +24,7 @@ jobs:
|
|||||||
- name: Add label on requested changes
|
- name: Add label on requested changes
|
||||||
if: github.event_name == 'pull_request_review'
|
if: github.event_name == 'pull_request_review'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ secrets.MARK_AS_DRAFT_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
run: |
|
run: |
|
||||||
@ -37,17 +34,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Mark PR as draft
|
- name: Mark PR as draft
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ secrets.MARK_AS_DRAFT_TOKEN }}
|
||||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
run: gh pr ready "$PR_URL" --undo || true
|
run: gh pr ready "$PR_URL" --undo || true
|
||||||
ready-for-review:
|
ready-for-review:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'pull_request' && github.event.action == 'ready_for_review'
|
if: github.event_name == 'pull_request' && github.event.action == 'ready_for_review'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Update labels for review
|
- name: Update labels for review
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ secrets.MARK_AS_DRAFT_TOKEN }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user