fix(ci): replace ISF gh pr create with a job-summary PR link - #2294
Merged
Roland Krummenacher (RolandKrummenacher) merged 2 commits intoSep 1, 2026
Merged
Conversation
The org disallows GitHub Actions from opening pull requests, so `gh pr create` fails with "GitHub Actions is not permitted to create or approve pull requests (createPullRequest)". The weekly run has failed on 17, 24 and 31 August -- every run since the first one that actually had a data change to publish. The 3 and 10 August runs passed only because they detected no changes and exited before the PR step, so the break was introduced with the step itself and stayed latent for two weeks. The fetch and the branch push both work; only the PR call fails. Each failed run therefore left an orphan branch behind, all three carrying the same one-row update. Mirrors the pattern already used by opendata-commitment-eligibility.yml, which hit the same wall: push the branch, then write a one-click compare link into the job summary for a maintainer to open. Opening the PR from there still triggers Open Data CI and normal review. Also drops the now-unused `pull-requests: write` permission and the GITHUB_TOKEN env var, and appends run_number to the branch name so a same-day re-run cannot collide with the branch an earlier run pushed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Roland Krummenacher (RolandKrummenacher)
requested review from
Brett Wilson (MSBrett) and
Michael Flanakin (flanakin)
as code owners
August 31, 2026 08:14
2 tasks
Copilot started reviewing on behalf of
Roland Krummenacher (RolandKrummenacher)
August 31, 2026 08:15
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Update Instance Size Flexibility GitHub Actions workflow so it no longer attempts to open a PR via gh pr create (which is blocked by org policy). Instead, when data changes are detected, it pushes a branch and writes a one-click compare/dev...<branch> link plus suggested PR title/body into the job summary for a maintainer to open manually.
Changes:
- Remove
pull-requests: writepermission and thegh pr createstep that fails under org policy. - Push a data-update branch and emit a “Create pull request” compare link + suggested PR text into
$GITHUB_STEP_SUMMARY. - Append a run identifier to the branch name to reduce collisions with existing pushed branches.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Michael Flanakin (flanakin)
approved these changes
Sep 1, 2026
run_number stays the same when a workflow run is re-run, so a re-run of a run that already pushed its branch would hit a rejected push. Append run_attempt, which increments per attempt. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
microsoft-github-policy-service
Bot
requested a review
from Michael Flanakin (flanakin)
September 1, 2026 06:58
Roland Krummenacher (RolandKrummenacher)
deleted the
RolandKrummenacher/isf-workflow-pr-link
branch
September 1, 2026 07:00
Roland Krummenacher (RolandKrummenacher)
temporarily deployed
to
ftk-pr
September 1, 2026 07:00 — with
GitHub Actions
Inactive
|
All Contributors (@all-contributors) please add Roland Krummenacher (@RolandKrummenacher) for code |
Contributor
|
@microsoft-github-policy-service[bot] Roland Krummenacher (@RolandKrummenacher) already contributed before to code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Update Instance Size Flexibility workflow has failed on every scheduled run since 17 August (run 32000829915, 32696676461, 33364273736). The failing step is
Create PR if data changed:The org has Allow GitHub Actions to create and approve pull requests disabled, and the org policy overrides the workflow's own
pull-requests: write.The break was latent, not new. The step was added on 12 Aug in fa19ad6. The 3 and 10 August runs went green only because they detected no data changes and exited at
No changes detectedbefore reachinggh pr create— verified in the 10 Aug log. 17 August was the first run with something to publish, and it has failed the same way every week since.The fetch and the branch push both succeed — only the PR call fails. So each failed run left an orphan branch behind, and all three carry the identical one-row update:
Fix
opendata-commitment-eligibility.ymlalready hit this exact wall and solved it, with a comment saying so. This aligns the ISF workflow with that pattern rather than inventing a second approach: push the branch, then write a one-clickcompare/dev...$BRANCH?expand=1link into the job summary for a maintainer to open. Opening the PR from there still triggers Open Data CI and normal review.The suggested title and body are emitted into the job summary as fenced blocks, so the wording the old
PR_BODYcarried isn't lost — it's copy-pasteable when opening the PR.Also in scope:
pull-requests: writepermission and theGITHUB_TOKENenv var.contents: write(push) andid-token: write(OIDC) stay.run_numberto the branch name, so a same-day re-run can't collide with the branch an earlier run already pushed. Matches the sibling workflow.Not in scope
The pending data row is being opened as a separate PR from the newest orphan branch, and the two redundant orphan branches removed. This PR is workflow-only.
No changelog entry — CI-only change with no effect on any shipped artifact, consistent with the other workflow-only PRs (#2242, #2233, #2244).
Test plan
yaml.safe_loadparses the workflow;permissionsresolves to{contents: write, id-token: write}and the step list is unchanged apart from the renamed final stepbash -non the extractedrun:script with the${{ }}expressions stubbedBRANCH/PR_URLand confirmed the markdown, the compare link, and both fenced blocks come out correctlyInvoke-Pester ./src/powershell/Tests/Unit/Update-InstanceSizeFlexibility.Tests.ps1— 15/15 pass (no assertions on the workflow file, run as a regression check)workflow_dispatchon this branch after merge to confirm a real run reaches the summary link🤖 Generated with Claude Code