Skip to content
Merged
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
52 changes: 52 additions & 0 deletions dynamic/copilot-swe-agent/copilot
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Copilot SWE Agent

on:
workflow_dispatch:
push:
branches:
- copilot/evaluate-software-stack
Comment on lines +3 to +7

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

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

The workflow trigger configuration is missing proper indentation. The workflow_dispatch should be on the same level as push, but both should be properties of the on key. Currently, this may cause the workflow to fail parsing.

Copilot uses AI. Check for mistakes.

jobs:
copilot-agent:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Determine OS and set environment
shell: bash
run: |
# Determine runner OS (use GitHub-provided RUNNER_OS or
# fallback to uname)
if [ -z "${RUNNER_OS:-}" ]; then
RUNNER_OS="$(uname -s 2>/dev/null || echo Unknown)"
fi

case "$RUNNER_OS" in
Linux|linux)

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

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

The case pattern includes both Linux and linux, but GitHub Actions sets RUNNER_OS to exactly 'Linux' (capitalized). The lowercase linux pattern will never match the GitHub-provided RUNNER_OS value and is unnecessary.

Suggested change
Linux|linux)
Linux)

Copilot uses AI. Check for mistakes.
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Linux — continuing."
;;
Windows|Windows_NT|MINGW*|CYGWIN*|msys*)

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

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

The case pattern uses wildcards (MINGW*, msys*) which work in shell case statements, but RUNNER_OS on Windows runners is always set to exactly 'Windows'. The additional patterns like MINGW*, CYGWIN*, and msys* will never match the GitHub-provided RUNNER_OS value and are unnecessary. Consider simplifying to just Windows.

Suggested change
Windows|Windows_NT|MINGW*|CYGWIN*|msys*)
Windows|Windows_NT)

Copilot uses AI. Check for mistakes.
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is Windows — continuing."
;;
Darwin|Mac|macOS)

Copilot AI Nov 4, 2025

Copy link

Choose a reason for hiding this comment

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

The case pattern includes multiple variations (Darwin|Mac|macOS), but GitHub Actions sets RUNNER_OS to exactly 'macOS' for macOS runners. The patterns Darwin and Mac will never match the GitHub-provided RUNNER_OS value. Consider simplifying to just macOS.

Suggested change
Darwin|Mac|macOS)
Darwin|macOS)

Copilot uses AI. Check for mistakes.
echo "SHOULD_CONTINUE=true" >> "$GITHUB_ENV"
echo "Runner OS is macOS — continuing."
;;
*)
# Unknown or unsupported OS — do not exit; mark that
# some steps should skip if needed
echo "SHOULD_CONTINUE=false" >> "$GITHUB_ENV"
printf '%s\n' \
"Runner OS ($RUNNER_OS) is not explicitly supported." \
"Continuing without quitting; check SHOULD_CONTINUE."
;;
esac

- name: Run Copilot Agent
if: env.SHOULD_CONTINUE == 'true'
run: |
echo "Running Copilot SWE Agent..."
# Add your Copilot agent commands here
Loading