From 004beceebf1437d7b19168f3fd502d2a70c19e12 Mon Sep 17 00:00:00 2001 From: Joseph Macaranas Date: Tue, 13 May 2025 18:48:03 -0400 Subject: [PATCH 1/2] [GitHub Actions] Changing default behaviour for PR imports --- .github/workflows/pr-auto-label.yml | 7 ++++++- .github/workflows/pr-import.yml | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index 2904be56795..c0058bf5376 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -20,6 +20,10 @@ on: types: - labeled - unlabeled + - opened + - synchronize + - reopened + - ready_for_review branches: - 'develop' - 'staging' @@ -72,7 +76,7 @@ jobs: env: GH_TOKEN: ${{ steps.generate-token.outputs.token }} run: | - PR_STATUS=$(gh pr view ${{ steps.pr_number.outputs.pr_number }} --json draft -q .draft) + PR_STATUS=$(gh pr view ${{ steps.pr_number.outputs.pr_number }} --json isDraft -q .isDraft) if [ "$PR_STATUS" == "true" ]; then echo "This PR is a draft. Skipping the workflow." exit 0 @@ -134,6 +138,7 @@ jobs: fi - name: Sync Custom Labels from Monorepo PR + if: github.event_name == 'workflow_run' env: GH_TOKEN: ${{ steps.generate-token.outputs.token }} run: | diff --git a/.github/workflows/pr-import.yml b/.github/workflows/pr-import.yml index 263ed536a0e..c7fc2cb5338 100644 --- a/.github/workflows/pr-import.yml +++ b/.github/workflows/pr-import.yml @@ -139,7 +139,6 @@ jobs: } >> pr_body.txt gh pr create \ - --draft \ --base develop \ --head "${{ steps.import-branch.outputs.import_branch }}" \ --title "$PR_TITLE" \ From 4264177d99e2ef81a33c569fc3842b23229f95a5 Mon Sep 17 00:00:00 2001 From: Joseph Macaranas Date: Tue, 13 May 2025 18:50:56 -0400 Subject: [PATCH 2/2] [GitHub Actions] Run workflows for drafts - To match existing CI behaviour for math libraries CI --- .github/workflows/pr-auto-label.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml index c0058bf5376..475570b9f6a 100644 --- a/.github/workflows/pr-auto-label.yml +++ b/.github/workflows/pr-auto-label.yml @@ -71,17 +71,6 @@ jobs: fi echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT - - name: Check if PR is a draft - id: check_draft - env: - GH_TOKEN: ${{ steps.generate-token.outputs.token }} - run: | - PR_STATUS=$(gh pr view ${{ steps.pr_number.outputs.pr_number }} --json isDraft -q .isDraft) - if [ "$PR_STATUS" == "true" ]; then - echo "This PR is a draft. Skipping the workflow." - exit 0 - fi - - name: Checkout workflows uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: