-
Notifications
You must be signed in to change notification settings - Fork 7
Add GitHub Copilot agent setup workflow #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #150 +/- ##
=======================================
Coverage 60.06% 60.06%
=======================================
Files 44 44
Lines 2935 2935
=======================================
Hits 1763 1763
Misses 927 927
Partials 245 245
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Co-authored-by: AlekSi <[email protected]>
name: Setup development environment for Copilot coding agent | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: FerretDB/github-actions/setup-go@main | ||
with: | ||
cache-key: copilot-setup | ||
|
||
- name: Install Task and tools | ||
run: go generate -x | ||
working-directory: tools | ||
|
||
- name: Initialize project dependencies | ||
run: bin/task init | ||
|
||
- name: Run code generators and formatters | ||
run: bin/task gen | ||
|
||
- name: Verify setup with short tests | ||
run: bin/task test-short No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To address the issue, add an explicit permissions
block to the workflow. Since the workflow involves checking out code and running local tasks, it only needs read access to the repository contents and does not require write permissions. The permissions
block should be added at the workflow level (root) to apply the least privilege configuration to all jobs within the workflow.
-
Copy modified lines R3-R4
@@ -1,5 +1,7 @@ | ||
--- | ||
name: Copilot Setup Steps | ||
permissions: | ||
contents: read | ||
|
||
on: workflow_dispatch | ||
|
This PR implements a GitHub workflow to help the Copilot coding agent understand how to set up the development environment for the FerretDB/wire project.
Changes Made
.github/workflows/copilot-setup-steps.yml
with a singlecopilot-setup-steps
jobImplementation Details
The workflow follows the exact same patterns as the existing
go.yml
workflow to ensure consistency:FerretDB/github-actions/setup-go@main
(same as existing workflows)This allows the GitHub Copilot coding agent to understand the development setup process for this Go-based MongoDB wire protocol implementation project, including its specific toolchain requirements and build system.
Fixes #149.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.