Skip to content

Commit 97c10ae

Browse files
CopilotstephentoubCopilot
authored
Fix CI not triggering on automated dependency update PRs (#1086)
* Fix CI not triggering on automated dependency update PRs Create dependency update PRs as drafts so maintainers can trigger CI by clicking "Ready for review". Add ready_for_review to pull_request types in all CI workflows. Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/4e36e957-26c2-47a9-88c2-7b630ff3a33b Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d519ac4 commit 97c10ae

10 files changed

+19
-1
lines changed

.github/workflows/codegen-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
89
paths:
910
- 'scripts/codegen/**'
1011
- 'nodejs/src/generated/**'

.github/workflows/corrections-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
paths:
77
- 'scripts/corrections/**'
88
pull_request:
9+
types: [opened, synchronize, reopened, ready_for_review]
910
paths:
1011
- 'scripts/corrections/**'
1112

.github/workflows/docs-validation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: "Documentation Validation"
22

33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- 'docs/**'
78
- 'nodejs/src/**'

.github/workflows/dotnet-sdk-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
89
paths:
910
- 'dotnet/**'
1011
- 'test/**'

.github/workflows/go-sdk-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
89
paths:
910
- 'go/**'
1011
- 'test/**'

.github/workflows/nodejs-sdk-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
pull_request:
11+
types: [opened, synchronize, reopened, ready_for_review]
1112
paths:
1213
- 'nodejs/**'
1314
- 'test/**'

.github/workflows/python-sdk-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
pull_request:
11+
types: [opened, synchronize, reopened, ready_for_review]
1112
paths:
1213
- 'python/**'
1314
- 'test/**'

.github/workflows/scenario-builds.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: "Scenario Build Verification"
22

33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- "test/scenarios/**"
78
- "nodejs/src/**"

.github/workflows/update-copilot-dependency.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,15 @@ jobs:
100100
git push origin "$BRANCH" --force-with-lease
101101
102102
if gh pr view "$BRANCH" >/dev/null 2>&1; then
103-
echo "Pull request for branch '$BRANCH' already exists; updated branch only."
103+
if [ "$(gh pr view "$BRANCH" --json isDraft --jq '.isDraft')" = "false" ]; then
104+
gh pr ready "$BRANCH" --undo
105+
echo "Pull request for branch '$BRANCH' already existed and was moved back to draft after updating the branch."
106+
else
107+
echo "Pull request for branch '$BRANCH' already exists and is already a draft; updated branch only."
108+
fi
104109
else
105110
gh pr create \
111+
--draft \
106112
--title "Update @github/copilot to $VERSION" \
107113
--body "Automated update of \`@github/copilot\` to version \`$VERSION\`.
108114
@@ -111,6 +117,9 @@ jobs:
111117
- Re-ran all code generators (\`scripts/codegen\`)
112118
- Formatted generated output
113119
120+
### Next steps
121+
When ready, click **Ready for review** to trigger CI checks.
122+
114123
> Created by the **Update @github/copilot Dependency** workflow." \
115124
--base main \
116125
--head "$BRANCH"

.github/workflows/verify-compiled.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Verify compiled workflows
22

33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- '.github/workflows/*.md'
78
- '.github/workflows/*.lock.yml'

0 commit comments

Comments
 (0)