Skip to content

Conversation

@tcheeric
Copy link
Owner

Why now?

Codex should only act on issues created automatically by the CI workflow to avoid manual triggering.
Related issue: #0

What changed?

  • Restrict Codex workflow to codex-labeled issues opened by github-actions[bot].

BREAKING

  • None.

Review focus

  • Ensure workflow condition is correct.

Checklist

  • Scope ≤ 300 lines (or split/stack)
  • Title is verb + object
  • Description links the issue and answers “why now?”
  • BREAKING flagged if needed
  • Tests/docs updated (if relevant)

Testing

mvn -q verify
# [ERROR] Tests run: 7, Failures: 0, Errors: 7, Skipped: 0
# java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration

https://chatgpt.com/codex/tasks/task_b_68a8df8ba3a483318010f4688f82d47b

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restricts the Codex workflow to only run on issues that are both labeled with 'codex' and opened by the github-actions[bot] user, preventing manual triggering of the workflow.

Key Changes

  • Added condition to check that issue creator is github-actions[bot]
  • Maintains existing codex label requirement

jobs:
codex-job:
if: contains(github.event.label.name, 'codex')
if: contains(github.event.label.name, 'codex') && github.event.issue.user.login == 'github-actions[bot]'
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

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

The condition may fail when the workflow is triggered by adding a label to an existing issue. The github.event.label context is only available when the trigger is specifically a label being added/removed, but github.event.issue.user refers to the issue creator, not the label event actor. Consider using github.actor or github.event.sender.login if you want to check who added the label, or ensure this condition only applies to the intended trigger events.

Suggested change
if: contains(github.event.label.name, 'codex') && github.event.issue.user.login == 'github-actions[bot]'
if: contains(github.event.label.name, 'codex') && github.event.sender.login == 'github-actions[bot]'

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tcheeric tcheeric merged commit 9924626 into develop Aug 22, 2025
4 checks passed
@tcheeric tcheeric deleted the codex/update-codex-job-condition-in-workflow branch August 22, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants