diff --git a/.github/workflows/codegen-check.yml b/.github/workflows/codegen-check.yml index c7d295221..9fd7f0542 100644 --- a/.github/workflows/codegen-check.yml +++ b/.github/workflows/codegen-check.yml @@ -5,6 +5,7 @@ on: branches: - main pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'scripts/codegen/**' - 'nodejs/src/generated/**' diff --git a/.github/workflows/corrections-tests.yml b/.github/workflows/corrections-tests.yml index a67840e6d..7654f3c9b 100644 --- a/.github/workflows/corrections-tests.yml +++ b/.github/workflows/corrections-tests.yml @@ -6,6 +6,7 @@ on: paths: - 'scripts/corrections/**' pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'scripts/corrections/**' diff --git a/.github/workflows/docs-validation.yml b/.github/workflows/docs-validation.yml index 89d2fa2a9..4c26e9ec1 100644 --- a/.github/workflows/docs-validation.yml +++ b/.github/workflows/docs-validation.yml @@ -2,6 +2,7 @@ name: "Documentation Validation" on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'docs/**' - 'nodejs/src/**' diff --git a/.github/workflows/dotnet-sdk-tests.yml b/.github/workflows/dotnet-sdk-tests.yml index 3ca9d1de9..872f06668 100644 --- a/.github/workflows/dotnet-sdk-tests.yml +++ b/.github/workflows/dotnet-sdk-tests.yml @@ -5,6 +5,7 @@ on: branches: - main pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'dotnet/**' - 'test/**' diff --git a/.github/workflows/go-sdk-tests.yml b/.github/workflows/go-sdk-tests.yml index ed75bcb0c..733954f1d 100644 --- a/.github/workflows/go-sdk-tests.yml +++ b/.github/workflows/go-sdk-tests.yml @@ -5,6 +5,7 @@ on: branches: - main pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'go/**' - 'test/**' diff --git a/.github/workflows/nodejs-sdk-tests.yml b/.github/workflows/nodejs-sdk-tests.yml index 9dec01667..141b161b6 100644 --- a/.github/workflows/nodejs-sdk-tests.yml +++ b/.github/workflows/nodejs-sdk-tests.yml @@ -8,6 +8,7 @@ on: branches: - main pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'nodejs/**' - 'test/**' diff --git a/.github/workflows/python-sdk-tests.yml b/.github/workflows/python-sdk-tests.yml index 941f08183..5b305ed09 100644 --- a/.github/workflows/python-sdk-tests.yml +++ b/.github/workflows/python-sdk-tests.yml @@ -8,6 +8,7 @@ on: branches: - main pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'python/**' - 'test/**' diff --git a/.github/workflows/scenario-builds.yml b/.github/workflows/scenario-builds.yml index 54d7257e5..ae368075c 100644 --- a/.github/workflows/scenario-builds.yml +++ b/.github/workflows/scenario-builds.yml @@ -2,6 +2,7 @@ name: "Scenario Build Verification" on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - "test/scenarios/**" - "nodejs/src/**" diff --git a/.github/workflows/update-copilot-dependency.yml b/.github/workflows/update-copilot-dependency.yml index b1d3cae6d..49b003fd4 100644 --- a/.github/workflows/update-copilot-dependency.yml +++ b/.github/workflows/update-copilot-dependency.yml @@ -100,9 +100,15 @@ jobs: git push origin "$BRANCH" --force-with-lease if gh pr view "$BRANCH" >/dev/null 2>&1; then - echo "Pull request for branch '$BRANCH' already exists; updated branch only." + if [ "$(gh pr view "$BRANCH" --json isDraft --jq '.isDraft')" = "false" ]; then + gh pr ready "$BRANCH" --undo + echo "Pull request for branch '$BRANCH' already existed and was moved back to draft after updating the branch." + else + echo "Pull request for branch '$BRANCH' already exists and is already a draft; updated branch only." + fi else gh pr create \ + --draft \ --title "Update @github/copilot to $VERSION" \ --body "Automated update of \`@github/copilot\` to version \`$VERSION\`. @@ -111,6 +117,9 @@ jobs: - Re-ran all code generators (\`scripts/codegen\`) - Formatted generated output + ### Next steps + When ready, click **Ready for review** to trigger CI checks. + > Created by the **Update @github/copilot Dependency** workflow." \ --base main \ --head "$BRANCH" diff --git a/.github/workflows/verify-compiled.yml b/.github/workflows/verify-compiled.yml index b78c4a85f..792dac172 100644 --- a/.github/workflows/verify-compiled.yml +++ b/.github/workflows/verify-compiled.yml @@ -2,6 +2,7 @@ name: Verify compiled workflows on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - '.github/workflows/*.md' - '.github/workflows/*.lock.yml'