mirror of
https://github.com/twentyhq/twenty.git
synced 2026-06-12 01:46:39 -04:00
# Introduction Cannot use github graphql mutation with a `GITHUB_TOKEN` needs a authenticated one Dispatching to ci-priv to do so
29 lines
910 B
YAML
29 lines
910 B
YAML
name: Auto-Draft External PRs
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
dispatch:
|
|
if: |
|
|
github.event.pull_request.draft == false &&
|
|
github.event.pull_request.author_association != 'MEMBER' &&
|
|
github.event.pull_request.author_association != 'OWNER' &&
|
|
github.event.pull_request.author_association != 'COLLABORATOR'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Dispatch to ci-privileged
|
|
env:
|
|
GH_TOKEN: ${{ secrets.CI_PRIVILEGED_DISPATCH_TOKEN }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
PR_NODE_ID: ${{ github.event.pull_request.node_id }}
|
|
run: |
|
|
gh api repos/twentyhq/ci-privileged/dispatches \
|
|
-f event_type=convert-pr-to-draft \
|
|
-f "client_payload[pr_number]=$PR_NUMBER" \
|
|
-f "client_payload[pr_node_id]=$PR_NODE_ID"
|