From 76931a4a1469db7652798591222dcdf4f8f2c7ca Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 08:36:28 -0500 Subject: [PATCH 01/22] Remove default MCP configuration and update Copilot setup to conditionally configure MCP based on user input --- action.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 2c50e6a..00385a9 100644 --- a/action.yml +++ b/action.yml @@ -17,10 +17,6 @@ inputs: mcp-config: description: 'MCP configuration for GitHub Copilot [Link](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp#writing-a-json-configuration-for-mcp-servers)' required: false - default: | - { - "mcpServers": { } - } copilot-config: description: 'Configuration for GitHub Copilot' required: false @@ -108,9 +104,11 @@ runs: env: COPILOT_VERSION: ${{ inputs.copilot-version }} - name: Configure Copilot + if: inputs.mcp-config shell: bash run: | echo "::group::Configuring Copilot" + cat $XDG_CONFIG_HOME/.copilot/mcp-config.json || echo "No existing MCP config found" mkdir -p $XDG_CONFIG_HOME/.copilot # Create base MCP config with GitHub MCP server (comes pre-configured by default) From ca1c1b09d136bbed5247219f6751cdf03cc4ccb0 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 08:39:13 -0500 Subject: [PATCH 02/22] Add additional prompt question for GitHub MCP tools in test workflow --- .github/workflows/test-copilot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-copilot.yml b/.github/workflows/test-copilot.yml index 2041f4d..d75eaeb 100644 --- a/.github/workflows/test-copilot.yml +++ b/.github/workflows/test-copilot.yml @@ -17,3 +17,5 @@ jobs: What is your plan? What tools do you have? Will you use them? + + Can you test out some github mcp tools? From 5b4a427553ecd966a72cb4ab4a3c3426a2527aed Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 08:40:32 -0500 Subject: [PATCH 03/22] Remove 'enable-all-github-mcp-tools' option from Copilot CLI workflow --- .github/workflows/test-copilot.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-copilot.yml b/.github/workflows/test-copilot.yml index d75eaeb..c7a15d6 100644 --- a/.github/workflows/test-copilot.yml +++ b/.github/workflows/test-copilot.yml @@ -10,7 +10,6 @@ jobs: - uses: austenstone/copilot-cli@main with: copilot-token: ${{ secrets.PAT }} - enable-all-github-mcp-tools: true prompt: | Who are you? From 1d8295e7255daf78557ae7f64a908caab2778e6a Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 08:41:38 -0500 Subject: [PATCH 04/22] Refactor GitHub Copilot CLI installation and configuration steps by removing unnecessary echo statements for improved clarity in logs --- action.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 00385a9..3991275 100644 --- a/action.yml +++ b/action.yml @@ -92,14 +92,12 @@ runs: # ${{ runner.os }}-copilot-cli- - name: Install GitHub Copilot CLI run: | - echo "::group::Installing GitHub Copilot CLI" if [ "$COPILOT_VERSION" = "latest" ]; then npm install -g @github/copilot else npm install -g @github/copilot@$COPILOT_VERSION fi copilot --version || echo "Warning: Could not get copilot version" - echo "::endgroup::" shell: bash env: COPILOT_VERSION: ${{ inputs.copilot-version }} @@ -107,7 +105,6 @@ runs: if: inputs.mcp-config shell: bash run: | - echo "::group::Configuring Copilot" cat $XDG_CONFIG_HOME/.copilot/mcp-config.json || echo "No existing MCP config found" mkdir -p $XDG_CONFIG_HOME/.copilot @@ -127,9 +124,7 @@ runs: id: copilot shell: bash run: | - echo "::group::Verifying GitHub CLI authentication" gh auth status - echo "::endgroup::" set +e # Don't exit on error @@ -205,7 +200,7 @@ runs: # Debug: Show the full command being executed echo "::group::GitHub Copilot CLI command" - printf '%s\n' "${COPILOT_ARGS[@]}" + printf '%s ' "${COPILOT_ARGS[@]}" echo "::endgroup::" # Execute the command with array expansion for proper quoting From e6d60f40a930aaf99ad36671e4eea8be00dda17a Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 08:52:03 -0500 Subject: [PATCH 05/22] Add GitHub authentication verification and streamline Copilot CLI argument handling --- action.yml | 91 +++++++++++++++++++++++++----------------------------- 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/action.yml b/action.yml index 3991275..eb546ca 100644 --- a/action.yml +++ b/action.yml @@ -74,22 +74,14 @@ outputs: runs: using: 'composite' steps: + - name: Verify GitHub Auth + shell: bash + run: gh auth status + env: + GH_TOKEN: ${{ inputs.copilot-token }} - uses: actions/setup-node@v6 with: node-version: '22' - # - name: Configure Git credentials - # run: | - # git config --global user.email "github-actions[bot]@users.noreply.github.com" - # git config --global user.name "${{ github.workflow }}" - # shell: bash - # - name: Cache Copilot CLI - # uses: actions/cache@v4 - # if: ${{ inputs.cache-cli == 'true' }} - # with: - # path: ~/.npm - # key: ${{ runner.os }}-copilot-cli-${{ inputs.copilot-version }} - # restore-keys: | - # ${{ runner.os }}-copilot-cli- - name: Install GitHub Copilot CLI run: | if [ "$COPILOT_VERSION" = "latest" ]; then @@ -101,7 +93,7 @@ runs: shell: bash env: COPILOT_VERSION: ${{ inputs.copilot-version }} - - name: Configure Copilot + - name: Configure Copilot MCP if: inputs.mcp-config shell: bash run: | @@ -120,25 +112,20 @@ runs: env: CONFIG: ${{ inputs.copilot-config }} MCP_CONFIG: ${{ inputs.mcp-config }} - - name: Run Copilot CLI - id: copilot + - name: Build Copilot Args shell: bash run: | - gh auth status - - set +e # Don't exit on error - - # Build args array for safer execution with multi-line prompts - COPILOT_ARGS=(-p "$PROMPT") + # Build args for copilot command + COPILOT_ARGS="" # Pre-trust common paths that Copilot might need in CI environment - COPILOT_ARGS+=(--add-dir "/") + COPILOT_ARGS+="--add-dir / " # Add additional trusted directories if [ -n "$ADDITIONAL_DIRS" ]; then IFS=',' read -ra DIRS <<< "$ADDITIONAL_DIRS" for dir in "${DIRS[@]}"; do - COPILOT_ARGS+=(--add-dir "$dir") + COPILOT_ARGS+="--add-dir $dir " done fi @@ -146,25 +133,25 @@ runs: if [ -n "$DISABLE_MCP_SERVERS" ]; then IFS=',' read -ra SERVERS <<< "$DISABLE_MCP_SERVERS" for server in "${SERVERS[@]}"; do - COPILOT_ARGS+=(--disable-mcp-server "$server") + COPILOT_ARGS+="--disable-mcp-server $server " done fi # Enable all GitHub MCP tools if [ "$ENABLE_ALL_GITHUB_MCP_TOOLS" = "true" ]; then - COPILOT_ARGS+=(--enable-all-github-mcp-tools) + COPILOT_ARGS+="--enable-all-github-mcp-tools " fi # Add tool permissions if [ "$ALLOW_ALL_TOOLS" = "true" ]; then - COPILOT_ARGS+=(--allow-all-tools) + COPILOT_ARGS+="--allow-all-tools " fi # Add allowed tools if [ -n "$ALLOWED_TOOLS" ]; then IFS=',' read -ra TOOLS <<< "$ALLOWED_TOOLS" for tool in "${TOOLS[@]}"; do - COPILOT_ARGS+=(--allow-tool "$tool") + COPILOT_ARGS+="--allow-tool $tool " done fi @@ -172,48 +159,40 @@ runs: if [ -n "$DENIED_TOOLS" ]; then IFS=',' read -ra TOOLS <<< "$DENIED_TOOLS" for tool in "${TOOLS[@]}"; do - COPILOT_ARGS+=(--deny-tool "$tool") + COPILOT_ARGS+="--deny-tool $tool " done fi # Add model selection if [ -n "$MODEL" ]; then - COPILOT_ARGS+=(--model "$MODEL") + COPILOT_ARGS+="--model $MODEL " fi # Add agent selection if [ -n "$AGENT" ]; then - COPILOT_ARGS+=(--agent "$AGENT") + COPILOT_ARGS+="--agent $AGENT " fi # Add resume session if [ -n "$RESUME_SESSION" ]; then if [ "$RESUME_SESSION" = "latest" ]; then - COPILOT_ARGS+=(--continue) + COPILOT_ARGS+="--continue " else - COPILOT_ARGS+=(--resume "$RESUME_SESSION") + COPILOT_ARGS+="--resume $RESUME_SESSION " fi fi # Add other options - COPILOT_ARGS+=(--log-dir "$HOME/.copilot/logs") + COPILOT_ARGS+="--log-dir $HOME/.copilot/logs" - # Debug: Show the full command being executed - echo "::group::GitHub Copilot CLI command" - printf '%s ' "${COPILOT_ARGS[@]}" + # Debug: Show the args + echo "::group::GitHub Copilot CLI args" + echo "$COPILOT_ARGS" echo "::endgroup::" - # Execute the command with array expansion for proper quoting - copilot "${COPILOT_ARGS[@]}" - EXIT_CODE=$? - - # Set outputs - echo "logs_path=$HOME/.copilot/logs" >> $GITHUB_OUTPUT - echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT + # Export args for subsequent steps + echo "COPILOT_ARGS=$COPILOT_ARGS" >> "$GITHUB_ENV" env: - GH_TOKEN: ${{ inputs.repo-token || inputs.copilot-token }} - COPILOT_GITHUB_TOKEN: ${{ inputs.copilot-token }} - PROMPT: ${{ inputs.prompt }} ALLOW_ALL_TOOLS: ${{ inputs.allow-all-tools }} ALLOWED_TOOLS: ${{ inputs.allowed-tools }} DENIED_TOOLS: ${{ inputs.denied-tools }} @@ -223,8 +202,22 @@ runs: DISABLE_MCP_SERVERS: ${{ inputs.disable-mcp-servers }} ENABLE_ALL_GITHUB_MCP_TOOLS: ${{ inputs.enable-all-github-mcp-tools }} RESUME_SESSION: ${{ inputs.resume-session }} - TEMP: ${{ runner.temp }} - GITHUB_WORKSPACE: ${{ github.workspace }} + - name: Run Copilot CLI + id: copilot + shell: bash + run: | + set +e + + copilot -p "$PROMPT" $COPILOT_ARGS + EXIT_CODE=$? + + # Set outputs + echo "logs_path=$HOME/.copilot/logs" >> $GITHUB_OUTPUT + echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ inputs.repo-token || inputs.copilot-token }} + COPILOT_GITHUB_TOKEN: ${{ inputs.copilot-token }} + PROMPT: ${{ inputs.prompt }} - name: Upload Copilot Artifacts uses: actions/upload-artifact@v4 if: ${{ always() && inputs.upload-artifact == 'true' }} From 29679ffb8c9b2e3e63a523b2ed762e685974ab51 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 08:54:44 -0500 Subject: [PATCH 06/22] Refactor Copilot CLI argument handling by removing unnecessary comments and streamlining the build process --- action.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/action.yml b/action.yml index eb546ca..a50674e 100644 --- a/action.yml +++ b/action.yml @@ -115,13 +115,10 @@ runs: - name: Build Copilot Args shell: bash run: | - # Build args for copilot command COPILOT_ARGS="" - # Pre-trust common paths that Copilot might need in CI environment COPILOT_ARGS+="--add-dir / " - # Add additional trusted directories if [ -n "$ADDITIONAL_DIRS" ]; then IFS=',' read -ra DIRS <<< "$ADDITIONAL_DIRS" for dir in "${DIRS[@]}"; do @@ -129,7 +126,6 @@ runs: done fi - # Add disabled MCP servers if [ -n "$DISABLE_MCP_SERVERS" ]; then IFS=',' read -ra SERVERS <<< "$DISABLE_MCP_SERVERS" for server in "${SERVERS[@]}"; do @@ -137,17 +133,14 @@ runs: done fi - # Enable all GitHub MCP tools if [ "$ENABLE_ALL_GITHUB_MCP_TOOLS" = "true" ]; then COPILOT_ARGS+="--enable-all-github-mcp-tools " fi - # Add tool permissions if [ "$ALLOW_ALL_TOOLS" = "true" ]; then COPILOT_ARGS+="--allow-all-tools " fi - # Add allowed tools if [ -n "$ALLOWED_TOOLS" ]; then IFS=',' read -ra TOOLS <<< "$ALLOWED_TOOLS" for tool in "${TOOLS[@]}"; do @@ -155,7 +148,6 @@ runs: done fi - # Add denied tools if [ -n "$DENIED_TOOLS" ]; then IFS=',' read -ra TOOLS <<< "$DENIED_TOOLS" for tool in "${TOOLS[@]}"; do @@ -163,17 +155,14 @@ runs: done fi - # Add model selection if [ -n "$MODEL" ]; then COPILOT_ARGS+="--model $MODEL " fi - # Add agent selection if [ -n "$AGENT" ]; then COPILOT_ARGS+="--agent $AGENT " fi - # Add resume session if [ -n "$RESUME_SESSION" ]; then if [ "$RESUME_SESSION" = "latest" ]; then COPILOT_ARGS+="--continue " @@ -182,15 +171,10 @@ runs: fi fi - # Add other options COPILOT_ARGS+="--log-dir $HOME/.copilot/logs" - # Debug: Show the args - echo "::group::GitHub Copilot CLI args" echo "$COPILOT_ARGS" - echo "::endgroup::" - # Export args for subsequent steps echo "COPILOT_ARGS=$COPILOT_ARGS" >> "$GITHUB_ENV" env: ALLOW_ALL_TOOLS: ${{ inputs.allow-all-tools }} @@ -207,7 +191,7 @@ runs: shell: bash run: | set +e - + copilot -p "$PROMPT" $COPILOT_ARGS EXIT_CODE=$? From c0380cee1e78a1bdd4666cf50391e7a7db6bd4d3 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 09:02:25 -0500 Subject: [PATCH 07/22] Add permissions declaration to Copilot CI fix workflow --- .github/workflows/copilot-ci-fix.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/copilot-ci-fix.yml b/.github/workflows/copilot-ci-fix.yml index 3ea293c..317cf66 100644 --- a/.github/workflows/copilot-ci-fix.yml +++ b/.github/workflows/copilot-ci-fix.yml @@ -3,6 +3,9 @@ on: workflows: ['*'] # All workflow failures types: [completed] +permissions: write-all + + jobs: ci-failure: runs-on: ubuntu-latest From 2afe8b7c374b225e8a11bf4428635a923cf6071c Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 09:07:16 -0500 Subject: [PATCH 08/22] Remove unnecessary blank line in Copilot CI fix workflow --- .github/workflows/copilot-ci-fix.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/copilot-ci-fix.yml b/.github/workflows/copilot-ci-fix.yml index 317cf66..603e837 100644 --- a/.github/workflows/copilot-ci-fix.yml +++ b/.github/workflows/copilot-ci-fix.yml @@ -4,7 +4,6 @@ on: types: [completed] permissions: write-all - jobs: ci-failure: From e7cbf507e3b6865b9dd15d877e77993acbce67b2 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 09:07:39 -0500 Subject: [PATCH 09/22] Remove commented-out configuration for enabling all GitHub MCP tools in Copilot CI fix workflow --- .github/workflows/copilot-ci-fix.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/copilot-ci-fix.yml b/.github/workflows/copilot-ci-fix.yml index 603e837..58dcaea 100644 --- a/.github/workflows/copilot-ci-fix.yml +++ b/.github/workflows/copilot-ci-fix.yml @@ -14,7 +14,6 @@ jobs: - uses: austenstone/copilot-cli@main with: copilot-token: ${{ secrets.PAT }} - # enable-all-github-mcp-tools: true mcp-config: | { "mcpServers": { From 1927f026342063adfb81d81c3d85a24617733334 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 09:08:11 -0500 Subject: [PATCH 10/22] Add guideline to prefer GitHub MCP tools over CLI commands in CI fixer agent --- .github/agents/ci-fixer.agent.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/agents/ci-fixer.agent.md b/.github/agents/ci-fixer.agent.md index 433e06b..647fe87 100644 --- a/.github/agents/ci-fixer.agent.md +++ b/.github/agents/ci-fixer.agent.md @@ -12,6 +12,7 @@ If the fix is ambiguous, propose the most likely solution in the PR description. - NEVER ask for clarification or additional information. You are operating autonomously and must make decisions based on the available data. - You MUST open a Pull Request with the proposed fix. If you fail to do so, keep trying with different approaches until successful. +- Use GitHub MCP tools over CLI commands when possible. From d8b3ed056076aa3efdc28f714c3e4a94258d5686 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 09:59:36 -0500 Subject: [PATCH 11/22] Update CI fixer workflow to use cicd-repair agent for improved error handling --- .github/agents/{ci-fixer.agent.md => cicd-repair.agent.md} | 0 .github/workflows/copilot-ci-fix.yml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/agents/{ci-fixer.agent.md => cicd-repair.agent.md} (100%) diff --git a/.github/agents/ci-fixer.agent.md b/.github/agents/cicd-repair.agent.md similarity index 100% rename from .github/agents/ci-fixer.agent.md rename to .github/agents/cicd-repair.agent.md diff --git a/.github/workflows/copilot-ci-fix.yml b/.github/workflows/copilot-ci-fix.yml index 58dcaea..42bc16a 100644 --- a/.github/workflows/copilot-ci-fix.yml +++ b/.github/workflows/copilot-ci-fix.yml @@ -3,7 +3,7 @@ on: workflows: ['*'] # All workflow failures types: [completed] -permissions: write-all +permissions: write-all # We need workflow: write jobs: ci-failure: @@ -28,7 +28,7 @@ jobs: } } } - agent: ci-fixer + agent: cicd-repair prompt: | The GitHub Actions workflow run failed. Please analyze the failure and suggest a fix. From 1065596caf1f1e5bf6ab2e6e32f23a90000ddc8a Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:02:17 -0500 Subject: [PATCH 12/22] Add log level input to Copilot CLI action for configurable logging --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index a50674e..bed2acc 100644 --- a/action.yml +++ b/action.yml @@ -64,6 +64,10 @@ inputs: agent: description: 'Specify a custom agent to use' required: false + log-level: + description: 'Set the log level (choices: "none", "error", "warning", "info", "debug", "all", "default")' + required: false + default: 'all' outputs: logs-path: description: 'Path to the copilot logs directory' @@ -171,6 +175,9 @@ runs: fi fi + if [ -n "$LOG_LEVEL" ]; then + COPILOT_ARGS+="--log-level $LOG_LEVEL " + fi COPILOT_ARGS+="--log-dir $HOME/.copilot/logs" echo "$COPILOT_ARGS" @@ -186,6 +193,7 @@ runs: DISABLE_MCP_SERVERS: ${{ inputs.disable-mcp-servers }} ENABLE_ALL_GITHUB_MCP_TOOLS: ${{ inputs.enable-all-github-mcp-tools }} RESUME_SESSION: ${{ inputs.resume-session }} + LOG_LEVEL: ${{ inputs.log-level }} - name: Run Copilot CLI id: copilot shell: bash From f43d1530c84e9a40c9516255477fe894303e85a4 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:17:19 -0500 Subject: [PATCH 13/22] Refactor Copilot CLI action to improve authentication and installation steps with grouped logging --- action.yml | 100 ++++++++++++++++++++++------------------------------- 1 file changed, 42 insertions(+), 58 deletions(-) diff --git a/action.yml b/action.yml index bed2acc..62c6835 100644 --- a/action.yml +++ b/action.yml @@ -78,95 +78,82 @@ outputs: runs: using: 'composite' steps: - - name: Verify GitHub Auth - shell: bash - run: gh auth status - env: - GH_TOKEN: ${{ inputs.copilot-token }} - uses: actions/setup-node@v6 with: node-version: '22' - - name: Install GitHub Copilot CLI + - name: Run GitHub Copilot CLI + id: copilot + shell: bash run: | + echo "::group::Verify GitHub Auth" + gh auth status + echo "::endgroup::" + + echo "::group::Install GitHub Copilot CLI" if [ "$COPILOT_VERSION" = "latest" ]; then npm install -g @github/copilot else npm install -g @github/copilot@$COPILOT_VERSION fi + echo "::endgroup::" + copilot --version || echo "Warning: Could not get copilot version" - shell: bash - env: - COPILOT_VERSION: ${{ inputs.copilot-version }} - - name: Configure Copilot MCP - if: inputs.mcp-config - shell: bash - run: | - cat $XDG_CONFIG_HOME/.copilot/mcp-config.json || echo "No existing MCP config found" - mkdir -p $XDG_CONFIG_HOME/.copilot - # Create base MCP config with GitHub MCP server (comes pre-configured by default) - BASE_MCP_CONFIG='{ - "mcpServers": { } - }' + echo "::group::Configure Copilot MCP" + if [ -n "$MCP_CONFIG" ]; then + cat $XDG_CONFIG_HOME/.copilot/mcp-config.json || echo "No existing MCP config found" + mkdir -p $XDG_CONFIG_HOME/.copilot + + BASE_MCP_CONFIG='{ + "mcpServers": { } + }' - # Merge user-provided MCP config with base config - MERGED_MCP_CONFIG=$(echo "$BASE_MCP_CONFIG" | jq --argjson user "$MCP_CONFIG" '.mcpServers += $user.mcpServers') - echo "$MERGED_MCP_CONFIG" > $XDG_CONFIG_HOME/.copilot/mcp-config.json - cat $XDG_CONFIG_HOME/.copilot/mcp-config.json - env: - CONFIG: ${{ inputs.copilot-config }} - MCP_CONFIG: ${{ inputs.mcp-config }} - - name: Build Copilot Args - shell: bash - run: | + MERGED_MCP_CONFIG=$(echo "$BASE_MCP_CONFIG" | jq --argjson user "$MCP_CONFIG" '.mcpServers += $user.mcpServers') + echo "$MERGED_MCP_CONFIG" > $XDG_CONFIG_HOME/.copilot/mcp-config.json + cat $XDG_CONFIG_HOME/.copilot/mcp-config.json + fi + echo "::endgroup::" + + echo "::group::Build Copilot Args" COPILOT_ARGS="" COPILOT_ARGS+="--add-dir / " - if [ -n "$ADDITIONAL_DIRS" ]; then IFS=',' read -ra DIRS <<< "$ADDITIONAL_DIRS" for dir in "${DIRS[@]}"; do COPILOT_ARGS+="--add-dir $dir " done fi - if [ -n "$DISABLE_MCP_SERVERS" ]; then IFS=',' read -ra SERVERS <<< "$DISABLE_MCP_SERVERS" for server in "${SERVERS[@]}"; do COPILOT_ARGS+="--disable-mcp-server $server " done fi - if [ "$ENABLE_ALL_GITHUB_MCP_TOOLS" = "true" ]; then COPILOT_ARGS+="--enable-all-github-mcp-tools " fi - if [ "$ALLOW_ALL_TOOLS" = "true" ]; then COPILOT_ARGS+="--allow-all-tools " fi - if [ -n "$ALLOWED_TOOLS" ]; then IFS=',' read -ra TOOLS <<< "$ALLOWED_TOOLS" for tool in "${TOOLS[@]}"; do COPILOT_ARGS+="--allow-tool $tool " done fi - if [ -n "$DENIED_TOOLS" ]; then IFS=',' read -ra TOOLS <<< "$DENIED_TOOLS" for tool in "${TOOLS[@]}"; do COPILOT_ARGS+="--deny-tool $tool " done fi - if [ -n "$MODEL" ]; then COPILOT_ARGS+="--model $MODEL " fi - if [ -n "$AGENT" ]; then COPILOT_ARGS+="--agent $AGENT " fi - if [ -n "$RESUME_SESSION" ]; then if [ "$RESUME_SESSION" = "latest" ]; then COPILOT_ARGS+="--continue " @@ -174,16 +161,29 @@ runs: COPILOT_ARGS+="--resume $RESUME_SESSION " fi fi - if [ -n "$LOG_LEVEL" ]; then COPILOT_ARGS+="--log-level $LOG_LEVEL " fi COPILOT_ARGS+="--log-dir $HOME/.copilot/logs" - + echo "$COPILOT_ARGS" - - echo "COPILOT_ARGS=$COPILOT_ARGS" >> "$GITHUB_ENV" + echo "::endgroup::" + + echo "::group::Run Copilot CLI" + set +e + copilot -p "$PROMPT" $COPILOT_ARGS + EXIT_CODE=$? + echo "::endgroup::" + + echo "logs_path=$HOME/.copilot/logs" >> $GITHUB_OUTPUT + echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT env: + GH_TOKEN: ${{ inputs.repo-token || inputs.copilot-token }} + COPILOT_GITHUB_TOKEN: ${{ inputs.copilot-token }} + PROMPT: ${{ inputs.prompt }} + COPILOT_VERSION: ${{ inputs.copilot-version }} + CONFIG: ${{ inputs.copilot-config }} + MCP_CONFIG: ${{ inputs.mcp-config }} ALLOW_ALL_TOOLS: ${{ inputs.allow-all-tools }} ALLOWED_TOOLS: ${{ inputs.allowed-tools }} DENIED_TOOLS: ${{ inputs.denied-tools }} @@ -194,22 +194,6 @@ runs: ENABLE_ALL_GITHUB_MCP_TOOLS: ${{ inputs.enable-all-github-mcp-tools }} RESUME_SESSION: ${{ inputs.resume-session }} LOG_LEVEL: ${{ inputs.log-level }} - - name: Run Copilot CLI - id: copilot - shell: bash - run: | - set +e - - copilot -p "$PROMPT" $COPILOT_ARGS - EXIT_CODE=$? - - # Set outputs - echo "logs_path=$HOME/.copilot/logs" >> $GITHUB_OUTPUT - echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT - env: - GH_TOKEN: ${{ inputs.repo-token || inputs.copilot-token }} - COPILOT_GITHUB_TOKEN: ${{ inputs.copilot-token }} - PROMPT: ${{ inputs.prompt }} - name: Upload Copilot Artifacts uses: actions/upload-artifact@v4 if: ${{ always() && inputs.upload-artifact == 'true' }} From 40b1b958489f61e869169165dd1545327cbdc00b Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:24:16 -0500 Subject: [PATCH 14/22] Enhance Copilot CLI action logging and MCP configuration steps for better visibility and error handling --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 62c6835..1184b6d 100644 --- a/action.yml +++ b/action.yml @@ -85,6 +85,7 @@ runs: id: copilot shell: bash run: | + # Script echo "::group::Verify GitHub Auth" gh auth status echo "::endgroup::" @@ -95,12 +96,11 @@ runs: else npm install -g @github/copilot@$COPILOT_VERSION fi + echo "CLI Version: $(copilot --version)" echo "::endgroup::" - - copilot --version || echo "Warning: Could not get copilot version" - echo "::group::Configure Copilot MCP" if [ -n "$MCP_CONFIG" ]; then + echo "::group::Configure Copilot MCP" cat $XDG_CONFIG_HOME/.copilot/mcp-config.json || echo "No existing MCP config found" mkdir -p $XDG_CONFIG_HOME/.copilot @@ -111,8 +111,8 @@ runs: MERGED_MCP_CONFIG=$(echo "$BASE_MCP_CONFIG" | jq --argjson user "$MCP_CONFIG" '.mcpServers += $user.mcpServers') echo "$MERGED_MCP_CONFIG" > $XDG_CONFIG_HOME/.copilot/mcp-config.json cat $XDG_CONFIG_HOME/.copilot/mcp-config.json + echo "::endgroup::" fi - echo "::endgroup::" echo "::group::Build Copilot Args" COPILOT_ARGS="" From 0139fbb470761bbb026b9b18fba252d0b5c3e6eb Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:25:39 -0500 Subject: [PATCH 15/22] Add logging for prompt in Copilot CLI action execution --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 1184b6d..760006a 100644 --- a/action.yml +++ b/action.yml @@ -169,6 +169,10 @@ runs: echo "$COPILOT_ARGS" echo "::endgroup::" + echo "::group::Prompt" + echo "$PROMPT" + echo "::endgroup::" + echo "::group::Run Copilot CLI" set +e copilot -p "$PROMPT" $COPILOT_ARGS From 39c3c15407e6d3ec3f2aab6c085d1c94053c41eb Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:30:19 -0500 Subject: [PATCH 16/22] Refactor action script to streamline GitHub authentication verification and update logging group names for clarity --- action.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 760006a..a637226 100644 --- a/action.yml +++ b/action.yml @@ -86,10 +86,7 @@ runs: shell: bash run: | # Script - echo "::group::Verify GitHub Auth" - gh auth status - echo "::endgroup::" - + echo "::group::Install GitHub Copilot CLI" if [ "$COPILOT_VERSION" = "latest" ]; then npm install -g @github/copilot @@ -114,7 +111,7 @@ runs: echo "::endgroup::" fi - echo "::group::Build Copilot Args" + echo "::group::Copilot Options" COPILOT_ARGS="" COPILOT_ARGS+="--add-dir / " From 053294bc26ceaf957ad2f423cfccb0cdaa71ec9c Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:36:25 -0500 Subject: [PATCH 17/22] Update README.md for improved clarity and accuracy --- README.md | Bin 16436 -> 20700 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index 079b47e37a40f032c0359cebe22f96cfb6832abe..ad0e9832bc7062ca792ae1ccfea56b2795ec466f 100644 GIT binary patch delta 4155 zcmcInU2Icj82$>3jm@#O-P&ygIO`Z)$=WV+)386nkHQ4pV4y()J7sIPN!N~cV-AD~ zH{L1m8sa5HukgZ{8DqQ=V#0-Y-WUvcVI)eT7hb3rCPts<`+EAbK@1nBIqf;$_nr6W zd7t;EpT6aKaMN|=w%l%dPWBD#k%a4_1Xdk!r&JuDab>9(u5D_Y4AzAGZE9HUR7X^Z zD_EabQ)*UCUUhp%V`>baxXR)a!PXHqi6;vp;wk|lb1I3Wma^4eHHh7P>ZsbKMsYW! z_Ny1v%h=)Rw3cDvc?f$Jq{P%&6^9DBR^xL;mfWlVaD}F!IE8B(a;H^0&Mn~0Is7_? z_u!spcbBy+TB;vUhaouz4Pl&2!I}kVq#M<$QeOi&(|_;g1N|O!PpKKzqfc0B#8`n7 zMo$KJvygKdGE=yZ!D|Cm1}ihz$!ciQDx(%QVJnN}F+9XI2r0ZUjeFv2%XbwUmXc+! zx#Zs3pX7`3p0eHQfEtuD<*m|J(c$WpSXKSf<%(BU$?bMu>rT9N7VoDt+>|h)rOrWZ zJ|Yrr@Vl}yxHTwWmv@yNRJ+x1sX)10aiu(Gtb9@tswxVL{9Ms{JcvlsP6Blf8tAYI z=@{H&SWjuUxkGDcNfsfPz=t$ouo<8kc%5blwZ|!}XJLt7IySGZGIElD*^*1)&8s7- z8_qV$ua)15-EvYUt%q`J%k`zdssk>0R9o9xz?^J(6PF=m-f^r1j|2oUzg9Yd2a!xxAPpR=*jTH4Y+Rbve z<~^}|YZgh9@G_Nj=?K;xVkNXfB0HNyIR*oW^R32z70|fEH3)4mWE#M;-4yrxaZOi8riMl+-7I0=oV*O#yVOBDe*ohgJ zl6c8Ew}oCvyXl)QyPE#YXZFov*3fqrZi9fshIx%YJ8vq7zq7*?+EOgTGzqqZ{OVTR z8aVPxSScM6up@WeL9zT@SL0@_GGj0jhv5cqy!#P;+Pq=qD%m?L}t^Ec+bKjskE}@id-MW3V1z z7n=m;8AL1&wo;W*Vj3qKzCMI+&O?lQVA(mo%P4X*7}a@B01#sHai`kEIR|s zr$8jy6oBR^u3@>;jTgpS=8~5)Oj#bkLG?Pw`Aaj5v2>vCov_U{jc-ONVA>$RsQYTqYe^>G&2& zz>39C&w^MB8fRM339>j-psuv?OHWjq`ksjvW_cT0S;v{mlxM~=U6m0l+JwZHGoEG{ z?%f0e^Fw3?RYHDrw~Udz{FlQiDvmc;6`g-1g~^bVoxzzY*hp^BO3HRL7yi8%pYokS zr_NOG2i?@ds?1JWJOG9@y`9Rz9zg1wvX+&qzL=cqX;`$Oa{(66!UFQoQpejCq2dEC45xQ{?1_7~waYj7d|SrYkI&y16=;+GZGG#BTu zSpn>vn7ov6n8m5M;0ggVS;IAIGJ`@^_2RyY<(p*(M`VM)rI}H4>b0%yE+}J3#3^61 zj%{(@C3aL~IL9taRjm13pVYsP@5W|gCQ=3nvXfW0O!o~QqkHV%2J;EnL<$hnIeCYNp%gJ3DD&(bX@9%Y!vFzVw5(590vi%>qq_d%89osB7vhsKT Oe)+TM;ZofW%k?iW4;teD delta 1679 zcmah}U1*b67=BM{*EU*fO}{iT$=72mrgLVi)LE$1PHL>(f)$lAP$6j=+Yf7!<0Wp z3WTGSlRLN$r68Fz`enS*bdCqr!k5Q@R>n&kJ%nM`%ACrvyJz zr%s$RR_8#^fS-m>qN$BHLW#ngJSdLg3pWR99++8BlJH67Q~0Gp6T3xl&ft~dtp}|R z!Km|+(5vvs=B~y94ON#L-l#9c)L8@W;4I;@^QJ1{WP=ps+ts5Kmsa4jq(bvaIt?M|qv4wB9hj_BxeZTJ8{_g&weH;HV&{u8P z^h&K?UC6s$t8EOXigd^nQ**c>8ju*J)Y_EiJ8&Fxo0c@G0$04!nEf}fyt z^Q?a--}2jDw`kg6NqSILgAocGUQ>5q%c$DV_qU7;oJI=sK&?0Lht05-4oxw*C{D`C+Ce+`+IV=>-7r$k_a+jMwbccVxb3bp z$=1i_vuP}5$u_DjW60I8dA@5a-y5^}|afbLE?HUi#V-{IIKspjCu_2%CfP vKx}miB?Z!FX%oJNq( Date: Fri, 28 Nov 2025 10:40:03 -0500 Subject: [PATCH 18/22] Refactor action inputs to use boolean values and add options for additional Copilot CLI parameters --- action.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index a637226..f2b2cbf 100644 --- a/action.yml +++ b/action.yml @@ -30,7 +30,7 @@ inputs: allow-all-tools: description: 'Allow all tools without approval' required: false - default: 'true' + default: true allowed-tools: description: 'Comma-separated list of tools to allow (e.g., "shell(rm),shell(git push)")' required: false @@ -53,7 +53,7 @@ inputs: enable-all-github-mcp-tools: description: 'Enable all GitHub MCP tools' required: false - default: 'false' + default: false resume-session: description: 'Resume from a previous session ID (use "latest" for most recent)' required: false @@ -68,6 +68,9 @@ inputs: description: 'Set the log level (choices: "none", "error", "warning", "info", "debug", "all", "default")' required: false default: 'all' + options: + description: 'Additional options to pass to the Copilot CLI (e.g., "--no-custom-instructions --screen-reader --no-color --model gpt-5")' + required: false outputs: logs-path: description: 'Path to the copilot logs directory' @@ -86,7 +89,7 @@ runs: shell: bash run: | # Script - + echo "::group::Install GitHub Copilot CLI" if [ "$COPILOT_VERSION" = "latest" ]; then npm install -g @github/copilot @@ -161,6 +164,9 @@ runs: if [ -n "$LOG_LEVEL" ]; then COPILOT_ARGS+="--log-level $LOG_LEVEL " fi + if [ -n "$EXTRA_ARGS" ]; then + COPILOT_ARGS+="$EXTRA_ARGS " + fi COPILOT_ARGS+="--log-dir $HOME/.copilot/logs" echo "$COPILOT_ARGS" @@ -195,6 +201,7 @@ runs: ENABLE_ALL_GITHUB_MCP_TOOLS: ${{ inputs.enable-all-github-mcp-tools }} RESUME_SESSION: ${{ inputs.resume-session }} LOG_LEVEL: ${{ inputs.log-level }} + EXTRA_ARGS: ${{ inputs.options }} - name: Upload Copilot Artifacts uses: actions/upload-artifact@v4 if: ${{ always() && inputs.upload-artifact == 'true' }} From 5db8338e0ad4ad716e8366cfdcf78b5e1bd1bd42 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:46:44 -0500 Subject: [PATCH 19/22] Update README.md to reflect recent changes and improve clarity --- README.md | Bin 20700 -> 20674 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index ad0e9832bc7062ca792ae1ccfea56b2795ec466f..8c4a21d18c4e2b31b910e0992089001519284376 100644 GIT binary patch delta 858 zcmZWnJ!n%=6h7|}7d2?AwnkfWqoNRPyO^RhKTYy#$7N^%Ve@?Oz;nVTnqAVZOc8>pXxptqyYEa zz}bCyY{$>d6KA=cndFa49(Pmx)GiMarfC`2ERq(GI)ne;q$J$hrS6#fD}3nLh|nXl zs7WS0p(;5PQ-wt!wWx;AB%9jMM!)Xu3zGUKG!3fLV`%Te%c2)3Isxx0?nPRMPmP}8 zW#L@})}{)r;oShzL5$g>C^uD@zG^t3hxjSO(rTnUw)5aCp!$$jGFOm<*`^flt#|YmY ztWbX|7mpSPE7efL6R6C=*HRq{rL!=0fkDglkWv$O1@<}#-pF2@o`KGQu0;>ka!gB3 hRM!<)+R9=>%3+xb93PuF<>0l3Oty+2biW(g$v-5fyf6R& delta 909 zcmZWnL2DC16n?w0RIH6wi5Mv+Zk1{=5g|Er6VoQCf(N0r#Y>QG+^#m7?uP89S_Jhj zNZSDq-g2;21Qqt!gW^RHdRNGQ=(R_`H_0Y7VVGpzH{bWY_vY=-rqXIE-;Sx`i~3S% zYC(Lwt%FzdQ6bIyy%dJ)$x-s7l_}Smc#MHh>B} zrcpW}w?Vv~kV|~W=nMH9r#NZ!5Mmq4qB6kM?fq1MM^t&1BAw##V5L0|2JZbw_92V9a+QW0T~9QW_X z##R5_rPpUTD&K>G`BgNsDE}=o;a36PZk``t5m{gUmjG@$!FF|PxgzJ!wT{HzR!yik9hN65? zk`ph|U7YWrpywQm{Oq)__47(XD8pyPdwu&J zM>Yx8LH5^`J};W51!P}9d+Vsc!kh!=aPA^BiQL{qzlPZ^Hh&!^1|KMLGviQ{X7+CO zD|k>Qp1O`49&I4wl0293G*(A%Li=I%??4}K^3iS|t$goYPKupESZIaK0mb)1PjR|< T8NTV_hLRNf#kBu>?r`KE_N=X! From b5945a4decc5f2662ba475a812da35661e512e81 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 28 Nov 2025 10:53:56 -0500 Subject: [PATCH 20/22] Update README.md for clarity and accuracy --- README.md | Bin 20674 -> 15166 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index 8c4a21d18c4e2b31b910e0992089001519284376..3d4e5b34dc19db1916490635f54fdbba4c0c6158 100644 GIT binary patch delta 457 zcmZ8d%Su8~6x}B?Gm-Kc5#kN$HBf?HR*;!?HH1hSG)qmdC792vAwdqC2Kx*8gW!xB z)W9F<2bweug4VgtVzbY_XR*#&d)?8C_~^f`IXLb(=VRS3y6kcKR$J7gIx0#XGN_H4 zL0vM@`=rr5&>C)rd~g&d`FVDluXerROS+{JU=3ZPJ3P@ayVhw^f5|1ElFhIUhFv0ANLxyQ#+G(%VJnLG zCy2)@iK5W8_r1u*Op}Q92ZMPy!Y$Bco)y8?|hfTk0mEn*$_+a%8V?ir0-?bhb5!XV4xrnhr=FgfsC9La5+rT@+e}-$|Hc6(_gDHrr}H=Hw??o z6~HKZ9O^16g9XijS#6^Us?=|W0hsyk@a zcY+r>&XVnIH58guJ)v`R)3PA%NK)oxR+hkv!_Fnt+q|B+gLeY+x&rY|K>99ZlgP35 zmE-ClIIM1lf6lFa6{{ zu_7L}&P`j_G_lG;rhR@{>;A)k#?_4o`_{0YnOy-|%n4LCqTlb_l#)6K&4i*DH@a`C z+UsL)#vw=Tj*Td2KBB>05tqkcvJ5sV8vTr9Rl579KBpQiS)@Hk!0sv4&|2=SST>Zy z71J#I)@mVE`9@})UL`svb>pIUDFRTP5}0_YqSd?F7FFvxdoDR-WK_4S3H4nlZY(&)J%5wmv8Cj7$apaa;wkT|zD&($^R%xDw#c zjo@*1`WXc9-QOvMub5A(l zMnPjsAJ$LqF}D~GdC0)uBs4KX=kQ_JFkPrQm((@Ey@XwWyt!PcXWfZ7D~Q!@!ABxd z(og3Qz_}0GXViXpSbb~{sL$tAN1)9qmy&jujVJCJNnx|0a^qGC8lFI|3V_W~$(WyQ%rp;C-0yfm zDu{JXdzRhreQ~LMyLP;o&_UdQEyA0@#T2i!ST~>%wg;HWf!K9?w?L@=4vgU#II2>< zfqoVNOO)2!$W+=lf&<}SBhNnoM$}inh`R3U3OOyAe&um8Ncslv=MWclJDWoZ@52bj zV6~On*fF?SGAxWZA`{fw%k6Gc>m^Gl50#Ad7Y*K7#A9LWFb7#n_byO zA@qh{sDCzG4ZLb$Pi7F#DUWos-)FFISx6qvaL-vlH7C^5p20A82=05_3#u|)_eS67 fsBcf+_IRf1KfLy>$8)7#yOQ>JuGW9MnmPL~y Date: Fri, 28 Nov 2025 11:26:02 -0500 Subject: [PATCH 21/22] Refactor CI workflows: streamline triggers, enhance Dependabot metadata fetching, and add repo-token for usage report --- .github/workflows/ci.yml | 8 ++-- .../workflows/copilot-dependabot-update.yml | 10 +++-- ...copilot-triage.yml => copilot-labeler.yml} | 38 ++----------------- .github/workflows/copilot-research.yml | 2 +- .github/workflows/copilot-security-triage.yml | 1 + .github/workflows/copilot-usage-report.yml | 1 + 6 files changed, 16 insertions(+), 44 deletions(-) rename .github/workflows/{copilot-triage.yml => copilot-labeler.yml} (57%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f005ec1..80b6416 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,16 +2,14 @@ name: Fake CI on: workflow_dispatch: - # push: - # branches: - # - main + pull_request: + branches: + - main jobs: build: runs-on: ubuntu-latest steps: - # - uses: actions/checkout@v5 - - run: echo "Hello, world!" - run: echo "Hello, world!" - run: exit 1 diff --git a/.github/workflows/copilot-dependabot-update.yml b/.github/workflows/copilot-dependabot-update.yml index 5b67c5c..cc3a802 100644 --- a/.github/workflows/copilot-dependabot-update.yml +++ b/.github/workflows/copilot-dependabot-update.yml @@ -9,13 +9,9 @@ jobs: if: github.event.pull_request.user.login == 'dependabot[bot]' steps: - uses: actions/checkout@v6 - - name: Fetch Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v2 - with: - copilot-token: ${{ secrets.GITHUB_TOKEN }} - - name: Generate dependency analysis with Copilot uses: austenstone/copilot-cli@main env: @@ -47,10 +43,16 @@ jobs: ### 2. Provided Context + #### Dependabot Metadata ```json ${{ toJson(steps.metadata.outputs) }} ``` + #### Event Data + ```event + ${{ toJson(github.event) }} + ``` + ### 3. Your Tasks Based on the context provided above: diff --git a/.github/workflows/copilot-triage.yml b/.github/workflows/copilot-labeler.yml similarity index 57% rename from .github/workflows/copilot-triage.yml rename to .github/workflows/copilot-labeler.yml index 991b5f2..c6c97aa 100644 --- a/.github/workflows/copilot-triage.yml +++ b/.github/workflows/copilot-labeler.yml @@ -1,52 +1,25 @@ on: - workflow_call: - schedule: - - cron: '0 * * * *' # Runs every hour issues: - types: [opened, edited, reopened] + types: [opened] pull_request: + types: [opened] branches: - 'main' - workflow_dispatch: jobs: triage: runs-on: ubuntu-latest timeout-minutes: 7 - outputs: - available_labels: '${{ steps.get_labels.outputs.available_labels }}' - selected_labels: '${{ env.SELECTED_LABELS }}' permissions: contents: 'read' id-token: 'write' issues: 'read' pull-requests: 'read' steps: - - name: 'Get repository labels' - id: get_labels - uses: 'actions/github-script@main' - with: - script: |- - const { data: labels } = await github.rest.issues.listLabelsForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - }); - - if (!labels || labels.length === 0) { - core.setFailed('There are no issue labels in this repository.') - } - - const labelNames = labels.map(label => label.name).sort(); - core.setOutput('available_labels', labelNames.join(',')); - core.info(`Found ${labelNames.length} labels: ${labelNames.join(', ')}`); - return labelNames; - uses: austenstone/copilot-cli@main - if: steps.get_labels.outputs.available_labels != '' env: - GITHUB_TOKEN: '' # Do NOT pass any auth tokens here since this runs on untrusted inputs ISSUE_TITLE: '${{ github.event.issue.title }}' ISSUE_BODY: '${{ github.event.issue.body }}' - AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}' with: copilot-token: ${{ secrets.PAT }} prompt: | @@ -61,11 +34,6 @@ jobs: ## Input Data - **Available Labels** (comma-separated): - ``` - ${{ env.AVAILABLE_LABELS }} - ``` - **Issue Title**: ``` ${{ env.ISSUE_TITLE }} @@ -83,6 +51,8 @@ jobs: ## Steps + 0. Fetch possible labels from the repository. + 1. Review the issue title, issue body, and available labels provided above. 2. Based on the issue title and issue body, classify the issue and choose all appropriate labels from the list of available labels. diff --git a/.github/workflows/copilot-research.yml b/.github/workflows/copilot-research.yml index 67aed3e..3b895a7 100644 --- a/.github/workflows/copilot-research.yml +++ b/.github/workflows/copilot-research.yml @@ -1,6 +1,6 @@ on: issues: - types: [opened, edited, reopened] + types: [opened] jobs: research: diff --git a/.github/workflows/copilot-security-triage.yml b/.github/workflows/copilot-security-triage.yml index 4782b29..6a50537 100644 --- a/.github/workflows/copilot-security-triage.yml +++ b/.github/workflows/copilot-security-triage.yml @@ -9,6 +9,7 @@ jobs: - uses: austenstone/copilot-cli@main with: copilot-token: ${{ secrets.PAT }} + enable-all-github-mcp-tools: true prompt: | ## Role diff --git a/.github/workflows/copilot-usage-report.yml b/.github/workflows/copilot-usage-report.yml index 789511a..654a3fd 100644 --- a/.github/workflows/copilot-usage-report.yml +++ b/.github/workflows/copilot-usage-report.yml @@ -8,6 +8,7 @@ jobs: - uses: austenstone/copilot-cli@main with: copilot-token: ${{ secrets.PAT }} + repo-token: ${{ secrets.PAT }} prompt: | ## Role From 18c2e8b7b4cf0afdb1dbdbfe010f5abb2b8a023c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 16:27:01 +0000 Subject: [PATCH 22/22] Bump actions/checkout from 5 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-copilot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-copilot.yml b/.github/workflows/test-copilot.yml index c7a15d6..5967edc 100644 --- a/.github/workflows/test-copilot.yml +++ b/.github/workflows/test-copilot.yml @@ -6,7 +6,7 @@ jobs: copilot: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: austenstone/copilot-cli@main with: copilot-token: ${{ secrets.PAT }}