The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix auto draft workflow (#20357)
Paul Rastoinca58c7f15e34
diff --git a/.github/workflows/external-contributor-pr-auto-draft.yaml b/.github/workflows/external-contributor-pr-auto-draft.yamlindex 5c9e085d1d7..97fbd907eb3 100644--- a/.github/workflows/external-contributor-pr-auto-draft.yaml+++ b/.github/workflows/external-contributor-pr-auto-draft.yaml@@ -4,11 +4,10 @@ on:pull_request_target:types: [opened]-permissions:- pull-requests: write+permissions: {}jobs:- convert-to-draft:+ dispatch:if: |github.event.pull_request.draft == false &&github.event.pull_request.author_association != 'MEMBER' &&@@ -17,26 +16,13 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 5steps:- - name: Convert to draft+ - name: Dispatch to ci-privilegedenv:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- PR_NODE_ID: ${{ github.event.pull_request.node_id }}- run: |- gh api graphql -f query="- mutation {- convertPullRequestToDraft(input: {pullRequestId: \"$PR_NODE_ID\"}) {- pullRequest { isDraft }- }- }- "-- - name: Welcome comment- env:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ 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 pr comment "$PR_NUMBER" --repo ${{ github.repository }} --body "👋 Thanks for contributing to Twenty!-- Your PR has been set to draft while you work on it. Once you're done, mark it as **Ready for review** and our automated checks will run.-- Looking forward to your contribution!"+ 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"