chore: add agentic workflows#102
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fbc043b00
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" | ||
| GITHUB_SERVER_URL: ${{ github.server_url }} | ||
| GITHUB_API_URL: ${{ github.api_url }} | ||
| GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1},\"create_pull_request\":{\"draft\":false,\"if_no_changes\":\"ignore\",\"labels\":[\"automation\",\"workflow-optimization\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"title_prefix\":\"[q] \"},\"missing_data\":{},\"missing_tool\":{}}" |
There was a problem hiding this comment.
Allow q workflow to edit
.github/workflows in PR output
Q - Agentic Workflow Optimizer is explicitly instructed to propose workflow-file changes (see .github/workflows/q.md, including “modified workflow files” and compile/validate steps), but this handler config blocks any PR patch under .github/ via "protected_path_prefixes":[".github/",".agents/"]. In this repo the target files live in .github/workflows/, so whenever the agent makes the intended optimization changes, create_pull_request will be rejected and the workflow cannot complete its primary function.
Useful? React with 👍 / 👎.
8fbc043 to
1bc32dc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bc32dcd3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mkdir -p /tmp/gh-aw/safeoutputs | ||
| mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs | ||
| cat > /opt/gh-aw/safeoutputs/config.json << 'GH_AW_SAFE_OUTPUTS_CONFIG_EOF' | ||
| {"add_comment":{"max":1},"create_issue":{"max":1},"missing_data":{},"missing_tool":{},"noop":{"max":1},"push_to_pull_request_branch":{"max":0}} |
There was a problem hiding this comment.
Enable push-to-pull-request output in pr-fix config
The safe-outputs config generated for the agent run sets push_to_pull_request_branch to "max":0, which effectively disables the workflow’s primary remediation action. As a result, /pr-fix can analyze failures but cannot emit the push operation needed to update the PR branch, so the workflow cannot complete its core job of applying fixes.
Useful? React with 👍 / 👎.
| if: > | ||
| (needs.pre_activation.outputs.activated == 'true') && ((github.event_name == 'issues') && ((startsWith(github.event.issue.body, '/pr-fix ')) || | ||
| (github.event.issue.body == '/pr-fix')) || (github.event_name == 'issue_comment') && (((startsWith(github.event.comment.body, '/pr-fix ')) || | ||
| (github.event.comment.body == '/pr-fix')) && (github.event.issue.pull_request == null)) || (github.event_name == 'issue_comment') && |
There was a problem hiding this comment.
Restrict pr-fix activation to pull-request contexts
This condition explicitly activates on issue_comment events where github.event.issue.pull_request == null, so /pr-fix on a regular issue still launches a PR-fix run. In that path there is no linked PR branch to update, while the prompt logic assumes a PR number, which leads to noisy failed/no-op runs for non-PR issue comments.
Useful? React with 👍 / 👎.
Summary
Adds GitHub Agentic Workflows (
gh-aw) for the developer documentation portal:/qcomment/pr-fixcommentConfiguration
.gitattributesadded withlinguist-generated=true merge=oursfor*.lock.yml