Skip to content

Migrate GitHub AI workflows to Codex#854

Closed
Kyle-Ye wants to merge 1 commit intomainfrom
codex/migrate-pr-triage-to-codex
Closed

Migrate GitHub AI workflows to Codex#854
Kyle-Ye wants to merge 1 commit intomainfrom
codex/migrate-pr-triage-to-codex

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Collaborator

@Kyle-Ye Kyle-Ye commented Apr 18, 2026

Summary

  • Replace the @claude workflow with an @codex workflow backed by openai/codex-action@v1.
  • Move PR and issue triage off the shared Claude workflows and into local Codex-backed workflows that validate labels before applying them.
  • Migrate release note highlights from Claude Code to Codex, with placeholder fallback when OPENAI_API_KEY is unavailable.

Safety shape

  • Uses OPENAI_API_KEY instead of CLAUDE_CODE_OAUTH_TOKEN.
  • Gates Codex runs on repository write access where user content can trigger the workflow.
  • Treats issue, PR, comment, patch, branch, and changelog text as untrusted data in prompts.
  • Runs Codex with sandbox: read-only and safety-strategy: drop-sudo.
  • Keeps GitHub mutations in separate github-script or shell steps that validate Codex output first.

Validation

  • ruby -ryaml -e 'ARGV.each { |f| YAML.load_file(f); puts "yaml ok #{f}" }' .github/workflows/codex.yml .github/workflows/issue-triage.yml .github/workflows/pr-triage.yml .github/workflows/release_notes.yml
  • /tmp/actionlint-1.7.12/actionlint -color=false .github/workflows/codex.yml .github/workflows/issue-triage.yml .github/workflows/pr-triage.yml .github/workflows/release_notes.yml
  • git diff --check
  • Dry-ran the PR and issue context collection paths with gh/jq.

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

Testing

  • ruby -ryaml -e 'ARGV.each { |f| YAML.load_file(f); puts "yaml ok #{f}" }' .github/workflows/codex.yml .github/workflows/issue-triage.yml .github/workflows/pr-triage.yml .github/workflows/release_notes.yml && git diff --check
  • ⚠️ /tmp/actionlint-1.7.12/actionlint -color=false .github/workflows/codex.yml .github/workflows/issue-triage.yml .github/workflows/pr-triage.yml .github/workflows/release_notes.yml (warning: binary not present in this environment: No such file or directory)

View task →

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Apr 18, 2026

🤖 Augment PR Summary

Summary: This PR migrates the repository’s GitHub AI automation from the shared Claude workflow to local Codex-backed workflows.

Changes:

  • Removes the reusable claude.yml workflow and adds a new codex.yml responder powered by openai/codex-action@v1.
  • Collects issue/PR + recent comments context via gh/jq and builds a single prompt file for Codex.
  • Gates Codex responses on @codex mention (or manual dispatch), and additionally checks the triggering actor has write-level repository permission.
  • Migrates issue triage and PR triage from shared workflows into local workflows that ask Codex for labels.
  • Validates Codex label output against the repository’s current labels before applying, preventing invalid label mutations.
  • Adds per-issue/PR concurrency keys to avoid overlapping triage runs.
  • Updates release note highlights generation to use Codex, with strict output validation and a placeholder fallback when OPENAI_API_KEY is absent.
  • Moves sensitive GitHub mutations (commenting, labeling, releasing) into explicit github-script / shell steps after validation.

Technical Notes: Codex runs with sandbox: read-only and safety-strategy: drop-sudo, and the prompts explicitly treat GitHub content as untrusted input.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.


case "$EVENT_NAME" in
issue_comment)
target_number="$(jq -r '.issue.number' "$EVENT_PATH")"
Copy link
Copy Markdown

@augmentcode augmentcode bot Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jq -r '.issue.number' can yield the literal string null if the expected field is missing, which won’t trip the -z "$target_number" guard and can later break gh api .../issues/$TARGET_NUMBER / --argjson targetNumber "$TARGET_NUMBER". Consider treating null as empty (e.g., via // empty) so the workflow reliably skips instead of failing on unexpected payload shapes.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 14.40%. Comparing base (8b4076e) to head (9610087).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #854      +/-   ##
==========================================
- Coverage   14.41%   14.40%   -0.01%     
==========================================
  Files         634      634              
  Lines       39006    39006              
==========================================
- Hits         5621     5619       -2     
- Misses      33385    33387       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye closed this Apr 19, 2026
@Kyle-Ye Kyle-Ye deleted the codex/migrate-pr-triage-to-codex branch April 19, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant