Compare commits

..

2 Commits

Author SHA1 Message Date
codex-action
6251c5e1fd Fix CI failures for PR #574 2026-01-20 22:31:08 +00:00
Carlos Polop
92d9f27e8b Test CI failure flow 2026-01-20 23:24:03 +01:00
2 changed files with 8 additions and 30 deletions

View File

@@ -35,25 +35,15 @@ jobs:
pr_head_branch=$(gh api -H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/pulls/${PR_NUMBER} \
--jq '.head.ref')
pr_labels=$(gh api -H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/issues/${PR_NUMBER} \
--jq '.labels[].name')
if echo "$pr_labels" | grep -q "^codex-fix-attempted$"; then
echo "codex fix already attempted for PR #${PR_NUMBER}; skipping."
should_run=false
else
should_run=true
fi
{
echo "number=${PR_NUMBER}"
echo "author=${pr_author}"
echo "head_repo=${pr_head_repo}"
echo "head_branch=${pr_head_branch}"
echo "should_run=${should_run}"
} >> "$GITHUB_OUTPUT"
- name: Comment on PR with failure info
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' }}
uses: actions/github-script@v7
env:
PR_NUMBER: ${{ steps.pr_context.outputs.number }}
@@ -71,34 +61,23 @@ jobs:
body,
});
- name: Mark fix attempt
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
env:
PR_NUMBER: ${{ steps.pr_context.outputs.number }}
GH_TOKEN: ${{ github.token }}
run: |
gh api -X POST -H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels \
-f labels='["codex-fix-attempted"]'
- name: Checkout PR head
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' }}
uses: actions/checkout@v5
with:
repository: ${{ steps.pr_context.outputs.head_repo }}
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0
persist-credentials: true
token: ${{ secrets.CODEX_FIXER_TOKEN }}
- name: Configure git author
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' }}
run: |
git config user.name "codex-action"
git config user.email "codex-action@users.noreply.github.com"
- name: Fetch failure summary
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' }}
env:
GH_TOKEN: ${{ github.token }}
RUN_ID: ${{ github.event.workflow_run.id }}
@@ -126,7 +105,7 @@ jobs:
PY
- name: Create Codex prompt
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' }}
env:
PR_NUMBER: ${{ steps.pr_context.outputs.number }}
RUN_URL: ${{ github.event.workflow_run.html_url }}
@@ -146,7 +125,7 @@ jobs:
} > codex_prompt.txt
- name: Run Codex
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' }}
id: run_codex
uses: openai/codex-action@v1
with:
@@ -156,7 +135,7 @@ jobs:
model: gpt-5.2-codex
- name: Commit and push if changed
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' }}
env:
TARGET_BRANCH: ${{ steps.pr_context.outputs.head_branch }}
PR_NUMBER: ${{ steps.pr_context.outputs.number }}
@@ -172,7 +151,7 @@ jobs:
git push origin HEAD:${TARGET_BRANCH}
- name: Comment with Codex result
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.pr_context.outputs.should_run == 'true' && steps.run_codex.outputs.final-message != '' }}
if: ${{ steps.pr_context.outputs.author == 'carlospolop' && steps.run_codex.outputs.final-message != '' }}
uses: actions/github-script@v7
env:
PR_NUMBER: ${{ steps.pr_context.outputs.number }}

View File

@@ -11,7 +11,6 @@ namespace winPEAS
[STAThread]
public static void Main(string[] args)
{
// TODO: keep Main minimal; this line was an intentional break in test PR.
Checks.Checks.Run(args);
}
}