-
Notifications
You must be signed in to change notification settings - Fork 0
Preserve Roadmap title and date display settings #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 33 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
e485077
Preserve Roadmap display options
SIkebe 04c909a
Remove obsolete compatibility paths
SIkebe 2a4251f
Harden Roadmap display validation
SIkebe 5e76dcf
Make Roadmap capture fail independently
SIkebe fb328d2
Validate required schema-v2 template state
SIkebe 58de71b
Exercise rendered Roadmap output in shared E2E
SIkebe 8892134
Add mixed-state Roadmap fixture coverage
SIkebe 4e45bdb
Centralize Roadmap rendering selectors
SIkebe df3bd58
Count only visible Roadmap dates
SIkebe e42898a
Model Roadmap display options as shared state
SIkebe b2be781
Revert "Harden Roadmap display validation"
SIkebe 52e07fc
Revert "Preserve Roadmap display options"
SIkebe e58b1fc
Document unsupported Roadmap display controls
SIkebe 04e88ef
Reject incomplete schema-v2 snapshots
SIkebe 6420d8d
Normalize malformed snapshot errors
SIkebe ca885b2
Require explicit schema-v2 state
SIkebe 29a938f
Align schema-v2 documentation
SIkebe ebe404a
Reapply "Preserve Roadmap display options"
SIkebe 974ee0e
Reapply "Harden Roadmap display validation"
SIkebe 23a6953
Persist browser-only view settings across sessions
SIkebe be72928
Flush recoverable Roadmap writes
SIkebe 357ab38
Keep profile persistence regression lightweight
SIkebe 6afd0c1
Verify Roadmap display controls independently
SIkebe dbb2ec6
Validate Roadmap state before import writes
SIkebe 591168a
Target Roadmap pills in rendering checks
SIkebe 1a05ea2
Restore browser profile after E2E drift
SIkebe d5c225c
Describe all retained E2E drifts
SIkebe 2b3a106
Test partial Roadmap state persistence
SIkebe cbd23e6
Gate Roadmap rendering fixture before import
SIkebe 93dbfd7
Retry delayed field default persistence
SIkebe 89d6fb8
Explain live API failures on pull requests
SIkebe de680e4
Isolate live API failure reporting
SIkebe b8e8df6
Fix trusted reporting and fixture guidance
SIkebe 6e12dd7
Sanitize integration test names in PR comments
SIkebe 673c6f5
Keep reusable live API workflow read-only
SIkebe af78fe7
Scope reporter token to individual steps
SIkebe c9f39af
Warn before using undocumented Roadmap UI
SIkebe 5c58cee
Isolate live API comments by commit
SIkebe 6c8d5ed
Serialize live API status comments per PR
SIkebe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| name: Report Live GitHub API | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: [CI] | ||
| types: [completed] | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: pwsh | ||
|
|
||
| jobs: | ||
| report: | ||
| name: Report integration result | ||
| if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.pull_requests[0] != null }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| RUN_ID: ${{ github.event.workflow_run.id }} | ||
| RUN_URL: ${{ github.event.workflow_run.html_url }} | ||
| steps: | ||
| - name: Find Live GitHub API result | ||
| id: result | ||
| run: | | ||
| $jobsJson = gh api --paginate --slurp "repos/$env:REPOSITORY/actions/runs/$env:RUN_ID/jobs?per_page=100" | ||
| if ($LASTEXITCODE -ne 0) { | ||
| throw 'Could not read jobs for the completed CI run.' | ||
| } | ||
| $jobs = @($jobsJson | ConvertFrom-Json | ForEach-Object { $_.jobs }) | ||
| $integration = @($jobs | Where-Object name -eq 'Live GitHub API / Integration' | Select-Object -Last 1) | ||
| if ($integration.Count -eq 0) { | ||
| 'result=skipped' | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
| exit 0 | ||
| } | ||
| $summary = @($jobs | Where-Object name -eq 'Live GitHub API / Summarize integration result' | Select-Object -Last 1) | ||
| $result = if ($integration[0].conclusion -eq 'success' -and | ||
| ($summary.Count -eq 0 -or $summary[0].conclusion -ne 'success')) { | ||
| 'skipped' | ||
| } | ||
| else { | ||
| $integration[0].conclusion | ||
| } | ||
| "result=$result" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
| - name: Download integration test results | ||
| if: ${{ steps.result.outputs.result == 'failure' }} | ||
| continue-on-error: true | ||
| run: gh run download "$env:RUN_ID" --repo "$env:REPOSITORY" --name live-api-test-results --dir tests/Ghpmv.Integration.Tests/TestResults | ||
| - name: Report integration failure | ||
| if: ${{ steps.result.outputs.result == 'failure' }} | ||
| run: | | ||
| $marker = '<!-- ghpmv-live-api-failure -->' | ||
| $reportPath = Get-ChildItem -LiteralPath 'tests/Ghpmv.Integration.Tests/TestResults' -Filter 'integration.trx' -File -Recurse -ErrorAction SilentlyContinue | | ||
| Select-Object -First 1 -ExpandProperty FullName | ||
| $failedTests = @() | ||
| $messages = @() | ||
| if ($null -ne $reportPath) { | ||
| $settings = [System.Xml.XmlReaderSettings]::new() | ||
| $settings.DtdProcessing = [System.Xml.DtdProcessing]::Prohibit | ||
| $settings.XmlResolver = $null | ||
| $reader = [System.Xml.XmlReader]::Create($reportPath, $settings) | ||
| $results = [System.Xml.XmlDocument]::new() | ||
| $results.XmlResolver = $null | ||
| try { | ||
| $results.Load($reader) | ||
| } | ||
| finally { | ||
| $reader.Dispose() | ||
| } | ||
| $failures = @($results.SelectNodes("//*[local-name()='UnitTestResult' and @outcome='Failed']")) | ||
| foreach ($failure in $failures) { | ||
| $failedTests += $failure.testName | ||
| $message = $failure.SelectSingleNode("./*[local-name()='Output']/*[local-name()='ErrorInfo']/*[local-name()='Message']") | ||
| if ($null -ne $message) { | ||
| $messages += $message.InnerText | ||
| } | ||
| } | ||
| } | ||
|
|
||
| $failureText = $messages -join "`n" | ||
| $diagnosis = if ($failureText -match 'Can only add 1000 curated projects to a repo') { | ||
| "The target fixture repository reached GitHub's 1,000 linked-Projects limit. Rotate the target fixture repository; rerunning without replacing it will fail again." | ||
| } | ||
| elseif ($failureText -match 'could not link repository') { | ||
| "Repository linking failed. Confirm the target fixture exists, the test token can administer it, and the repository has not reached GitHub's linked-Projects limit." | ||
| } | ||
| elseif ($failureText -match '(?i)rate limit') { | ||
| 'GitHub API rate limiting interrupted the live test. Review the rate-limit entries in the run log before rerunning.' | ||
| } | ||
| elseif ($failureText -match 'Resource not accessible by personal access token') { | ||
| 'The test token lacks access required by the failing GitHub operation. Review its scopes, repository access, approval, and SSO authorization.' | ||
| } | ||
| else { | ||
| 'The live GitHub API test failed for an unclassified reason. Inspect the run log and uploaded TRX artifact.' | ||
| } | ||
|
|
||
| $testLines = if ($failedTests.Count -gt 0) { | ||
| @($failedTests | Sort-Object -Unique | ForEach-Object { | ||
| $safeName = [System.Net.WebUtility]::HtmlEncode($_).Replace('`', '`') | ||
| "- ``$safeName``" | ||
| }) | ||
|
SIkebe marked this conversation as resolved.
|
||
| } | ||
| else { | ||
| @('- Failed test names were unavailable; inspect the run log.') | ||
| } | ||
| $body = (@( | ||
| $marker | ||
| '### Live GitHub API check failed' | ||
| '' | ||
| "**Diagnosis:** $diagnosis" | ||
| '' | ||
| '**Failed tests:**' | ||
| ) + $testLines + @( | ||
| '' | ||
| "[Open the Actions run]($env:RUN_URL)" | ||
| )) -join "`n" | ||
|
|
||
| Add-Content -LiteralPath $env:GITHUB_STEP_SUMMARY -Value ($body.Replace($marker, '').Trim()) | ||
| Write-Output "::error title=Live GitHub API check failed::$diagnosis" | ||
| $commentsJson = gh api --paginate --slurp "repos/$env:REPOSITORY/issues/$env:PR_NUMBER/comments?per_page=100" | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Output '::warning title=PR failure comment was not posted::Could not list existing pull request comments.' | ||
| exit 0 | ||
| } | ||
| $comments = @($commentsJson | ConvertFrom-Json | ForEach-Object { $_ }) | ||
| $comment = @($comments | Where-Object { | ||
| $_.user.login -eq 'github-actions[bot]' -and $_.body.Contains($marker, [StringComparison]::Ordinal) | ||
| } | Select-Object -Last 1) | ||
| $payload = @{ body = $body } | ConvertTo-Json -Compress | ||
| if ($comment.Count -eq 1) { | ||
| $payload | gh api --method PATCH "repos/$env:REPOSITORY/issues/comments/$($comment[0].id)" --input - | ||
| } | ||
| else { | ||
| $payload | gh api --method POST "repos/$env:REPOSITORY/issues/$env:PR_NUMBER/comments" --input - | ||
| } | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Output '::warning title=PR failure comment was not posted::The pull request comment API request failed.' | ||
| exit 0 | ||
| } | ||
| - name: Resolve integration failure comment | ||
| if: ${{ steps.result.outputs.result == 'success' }} | ||
| run: | | ||
| $marker = '<!-- ghpmv-live-api-failure -->' | ||
| $commentsJson = gh api --paginate --slurp "repos/$env:REPOSITORY/issues/$env:PR_NUMBER/comments?per_page=100" | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Output '::warning title=PR failure comment was not resolved::Could not list existing pull request comments.' | ||
| exit 0 | ||
| } | ||
| $comments = @($commentsJson | ConvertFrom-Json | ForEach-Object { $_ }) | ||
| $comment = @($comments | Where-Object { | ||
| $_.user.login -eq 'github-actions[bot]' -and $_.body.Contains($marker, [StringComparison]::Ordinal) | ||
| } | Select-Object -Last 1) | ||
| if ($comment.Count -eq 0) { | ||
| Write-Output 'No prior Live GitHub API failure comment exists.' | ||
| exit 0 | ||
| } | ||
|
|
||
| $body = @" | ||
| $marker | ||
| ### Live GitHub API check recovered | ||
|
|
||
| The Live GitHub API check passed on the [latest Actions run]($env:RUN_URL). | ||
| "@ | ||
| $payload = @{ body = $body.Trim() } | ConvertTo-Json -Compress | ||
| $payload | gh api --method PATCH "repos/$env:REPOSITORY/issues/comments/$($comment[0].id)" --input - | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Output '::warning title=PR failure comment was not resolved::The pull request comment API request failed.' | ||
| exit 0 | ||
| } | ||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.