Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Removed duplicate roles from the release workflow configuration.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…into copilot/fix-github-actions-workflow-388c9a05-79e1-4c9a-b08c-c0e743e6a48f
The roles-to-on-roles codemod was added in the copilot/move-roles-to-on-roles branch, increasing the total count from 18 to 19 codemods. Updated test expectations to match. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow test
Update test expectations for roles-to-on-roles codemod
Feb 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds the roles-to-on-roles codemod to migrate the roles field from top-level frontmatter to on.roles per the new frontmatter structure. The PR updates test expectations that were failing after the codemod was added but not reflected in the test suite.
Changes:
- Added new codemod
roles-to-on-roleswith comprehensive test coverage - Updated
extractRoles()function to only checkon.roles(no longer supports top-levelroles) - Migrated JSON schema, documentation, and all example workflows to use
on.rolesinstead of top-levelroles
Reviewed changes
Copilot reviewed 20 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/fix_codemods_test.go | Updated expected codemod count from 18 to 19 and added roles-to-on-roles to expected order list |
| pkg/cli/fix_codemods.go | Added getRolesToOnRolesCodemod() to the list of codemods |
| pkg/cli/codemod_roles.go | New codemod implementation that migrates top-level roles to on.roles |
| pkg/cli/codemod_roles_test.go | Comprehensive tests for the new codemod covering single-line arrays, multi-line arrays, and edge cases |
| pkg/workflow/role_checks.go | Updated extractRoles() to only check on.roles instead of top-level roles, and extracted parseRolesValue() helper |
| pkg/workflow/extract_roles_test.go | New tests validating that only on.roles is supported and top-level roles returns defaults |
| pkg/workflow/skip_roles_test.go | Fixed indentation of roles field to be nested under on |
| pkg/workflow/role_checks_test.go | Fixed indentation of roles fields to be nested under on |
| pkg/workflow/bots_test.go | Fixed indentation of roles field to be nested under on |
| pkg/parser/schemas/main_workflow_schema.json | Moved roles schema definition from top-level to on object properties |
| docs/src/content/docs/reference/frontmatter.md | Updated documentation to show on.roles syntax with migration note |
| docs/src/content/docs/reference/frontmatter-full.md | Removed top-level roles example from full frontmatter reference |
| docs/src/content/docs/patterns/dispatchops.md | Updated example to use on.roles instead of top-level roles |
| .github/workflows/scout.md | Migrated roles from top-level to on.roles |
| .github/workflows/scout.lock.yml | Updated lock file with new frontmatter hash reflecting on.roles structure |
| .github/workflows/release.md | Migrated roles from top-level to on.roles |
| .github/workflows/release.lock.yml | Updated lock file with new frontmatter hash reflecting on.roles structure |
| .github/workflows/q.md | Migrated roles from top-level to on.roles |
| .github/workflows/q.lock.yml | Updated lock file with new frontmatter hash and conditional logic reflecting on.roles structure |
| .github/workflows/poem-bot.md | Migrated roles from top-level to on.roles |
| .github/workflows/poem-bot.lock.yml | Updated lock file with new frontmatter hash reflecting on.roles structure |
| .github/workflows/ai-moderator.md | Migrated roles from top-level to on.roles |
| .github/workflows/ai-moderator.lock.yml | Updated lock file with new frontmatter hash reflecting on.roles structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Feb 18, 2026
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.
Tests failed in job 64061203982 because the
roles-to-on-rolescodemod was added but test expectations were not updated.Changes
roles-to-on-rolesto the expected order listcopilot/move-roles-to-on-rolesbranch to include the new codemod implementationThe new codemod migrates top-level
rolesfield toon.rolesper the new frontmatter structure.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/actions/github-script/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha(http block)https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts/usr/bin/gh gh run download 1 --dir test-logs/run-1(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts/usr/bin/gh gh run download 12345 --dir test-logs/run-12345(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts/usr/bin/gh gh run download 12346 --dir test-logs/run-12346(http block)https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts/usr/bin/gh gh run download 2 --dir test-logs/run-2 fuzz/counters_supported.go 64/pkg/tool/linux_amd64/compile(http block)https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts/usr/bin/gh gh run download 3 --dir test-logs/run-3(http block)https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts/usr/bin/gh gh run download 4 --dir test-logs/run-4(http block)https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts/usr/bin/gh gh run download 5 --dir test-logs/run-5 ew@v1.1.1/spew/common.go 64/pkg/tool/linux_amd64/compile(http block)https://api.github.com/repos/github/gh-aw/actions/workflows/usr/bin/gh gh workflow list --json name,state,path(http block)/usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100(http block)/usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6(http block)https://api.github.com/repos/nonexistent/repo/actions/runs/12345/usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion(http block)https://api.github.com/repos/owner/repo/actions/workflows/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo(http block)/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 0/x64/bin/git(http block)https://api.github.com/repos/owner/repo/contents/file.md/tmp/go-build1533126456/b001/cli.test /tmp/go-build1533126456/b001/cli.test -test.testlogfile=/tmp/go-build1533126456/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(http block)https://api.github.com/repos/test-owner/test-repo/actions/secrets/usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.