Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/maui-expert-autopilot.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion .github/workflows/maui-expert-autopilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ jobs:
OPUS_RUN: ${{ needs.pre_activation.outputs.autopilot_opus_run }}
LOOP_START: ${{ needs.pre_activation.outputs.autopilot_loop_start }}
REQUESTED_BY: ${{ needs.pre_activation.outputs.autopilot_requested_by }}
SOURCE: ${{ needs.pre_activation.outputs.autopilot_source }}
with:
script: |
// Every error is reported on the PR, pinging the maintainer who started the loop.
Expand Down Expand Up @@ -663,6 +664,8 @@ jobs:
const reason = (note?.body || '').replace(/<!--[\s\S]*?-->/g, '').replace(/^\*\*MAUI Autopilot\*\*[^\n]*\n+/, '').trim().replace(/^❌\s*/, '');
const summary = failed
? `❌ The fix round failed twice in a row${rateLimited ? ', on the Copilot API rate limit' : ''}. Comment \`/review autopilot\` to try again.`
: process.env.SOURCE === 'conflicts'
? '❌ The merge conflicts with the base branch could not be resolved automatically. Resolve them, then comment `/review autopilot` to continue.'
: '❌ The last fix round found nothing more it could fix. Decide how to continue, or comment `/review autopilot` to run it again.';
const why = reason ? `\n\n<details><summary>Why</summary>\n\n${reason}\n\n</details>` : '';
await reportError(number, 'Stopped', summary + why, requester, failed ? errors : null);
Expand Down Expand Up @@ -731,7 +734,8 @@ jobs:
const published = process.env.IS_FORK === 'true' ? !!followUp : pr.state === 'open' && pr.head.sha !== process.env.HEAD_SHA;
if (!published) {
// Nothing published, but if the round answered every open thread, the loop moves on (to tests or done).
if (pr.state === 'open' && !failed && !(await unansweredThreads())) {
// Not after a conflicts round: the PR still conflicts, so the next round would be the same merge again.
if (pr.state === 'open' && !failed && process.env.SOURCE !== 'conflicts' && !(await unansweredThreads())) {
await github.rest.actions.createWorkflowDispatch({ ...context.repo, workflow_id: 'maui-expert-autopilot.lock.yml',
ref: context.payload.repository.default_branch, inputs: { pr_number: String(number) } });
return core.info(`#${number}: every thread is answered; the loop continues.`);
Expand Down
Loading