Skip to content

Commit 9e2a268

Browse files
committed
Consolidate Copilot automations and remove redundant actions
Delete ci-fix and dependabot-update composite actions and the copilot-comment-test workflow. Update copilot action description for mcp-config. Modify CI failure and Dependabot workflows to call the single .github/actions/copilot action, add checkout/metadata steps, Context7 MCP config, and inline prompts.
1 parent 031af67 commit 9e2a268

6 files changed

Lines changed: 81 additions & 77 deletions

File tree

β€Ž.github/actions/ci-fix/action.ymlβ€Ž

Lines changed: 0 additions & 23 deletions
This file was deleted.

β€Ž.github/actions/copilot/action.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
description: 'Prompt to send to GitHub Copilot'
99
required: true
1010
mcp-config:
11-
description: 'MCP configuration for GitHub Copilot'
11+
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)'
1212
required: false
1313
default: |
1414
{

β€Ž.github/actions/dependabot-update/action.ymlβ€Ž

Lines changed: 0 additions & 25 deletions
This file was deleted.

β€Ž.github/workflows/copilot-ci-fix.ymlβ€Ž

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ on:
66
jobs:
77
on-failure:
88
runs-on: ubuntu-latest
9-
concurrency:
10-
group: ci-fix
11-
cancel-in-progress: true
129
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
1310
steps:
14-
- uses: austenstone/copilot-cli-actions/.github/actions/ci-fix@main
11+
- uses: austenstone/copilot-cli-actions/.github/actions/copilot@main
1512
with:
16-
github-token: ${{ secrets.PAT }}
13+
github-token: ${{ secrets.PAT }}
14+
prompt: |
15+
The GitHub Actions workflow run failed.
16+
Please analyze the failure and suggest a fix.
17+
Create a pull request with the necessary changes.
18+
Include the error logs and any relevant information.
19+
20+
At the end, summarize the outcome of your task using "actions-toolkit-mcp" mcp tool
21+
22+
Workflow Run: ${{ github.event.workflow_run.url }}
23+
GitHub Context: ${{ toJson(github) }}

β€Ž.github/workflows/copilot-comment-test.ymlβ€Ž

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,75 @@
1+
name: Copilot Dependabot Automation
2+
13
on:
24
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
issues: write
11+
repository-projects: write
312

413
jobs:
5-
dependabot:
14+
dependabot-analysis:
615
runs-on: ubuntu-latest
7-
if: github.event.pull_request.user.login == 'dependabot[bot]'
16+
if: github.event.pull_request.user.login == 'dependabot[bot]'
817
steps:
9-
- uses: austenstone/copilot-cli-actions/.github/actions/dependabot-update@main
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
token: ${{ secrets.PAT || github.token }}
22+
fetch-depth: 0
23+
24+
- name: Fetch Dependabot metadata
25+
id: metadata
26+
uses: dependabot/fetch-metadata@v2
27+
with:
28+
github-token: ${{ secrets.PAT || github.token }}
29+
30+
- name: Generate dependency analysis with Copilot
31+
uses: austenstone/copilot-cli-actions/.github/actions/copilot@main
32+
env:
33+
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }}
1034
with:
11-
github-token: ${{ secrets.PAT }}
35+
github-token: ${{ secrets.PAT || github.token }}
36+
mcp-config: |
37+
{
38+
"mcpServers": {
39+
"context7": {
40+
"type": "http",
41+
"url": "https://mcp.context7.com/mcp",
42+
"headers": {
43+
"CONTEXT7_API_KEY": "$(CONTEXT7_API_KEY)"
44+
},
45+
"tools": ["get-library-docs", "resolve-library-id"]
46+
}
47+
}
48+
}
49+
prompt: |
50+
πŸ” **Dependabot Dependency Analysis Request**
51+
52+
I need you to analyze this Dependabot pull request and provide comprehensive insights about the dependency update:
53+
54+
**PR Details:**
55+
${{ toJson(steps.metadata.outputs) }}
56+
57+
**Tasks to complete:**
58+
59+
1. **Use Context7 to get documentation** for each dependency being updated
60+
2. **Analyze version changes** - what's new, breaking changes, deprecations
61+
3. **Security assessment** - check for known vulnerabilities and fixes
62+
4. **Impact analysis** - assess potential impact on the codebase
63+
5. **Compatibility review** - check for breaking changes and migration needs
64+
6. **Generate recommendations** - should this be auto-merged, needs review, or requires manual intervention
65+
66+
**Output Format:**
67+
Create a comprehensive analysis comment that includes:
68+
- πŸ“‹ Summary of changes
69+
- πŸ”’ Security implications
70+
- ⚠️ Breaking changes (if any)
71+
- πŸš€ New features/improvements
72+
- πŸ“ Migration notes (if needed)
73+
- βœ… Recommendation (auto-merge, review, manual)
74+
75+
Please post this analysis as a comment on the PR: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
Β (0)