Conversation
…est coverage issues - Added from https://github.com/sitoader/AgenticWorkflows
…generation, and test generation - Added from https://github.com/sitoader/AgenticWorkflows
…mentation and test generation using GitHub Copilot - Added from https://github.com/sitoader/AgenticWorkflows
There was a problem hiding this comment.
Pull request overview
This PR introduces agentic workflow automation using GitHub Copilot CLI to automatically analyze code changes and create issues for documentation and test coverage. The workflows leverage GitHub Actions and specialized prompts to enable autonomous code quality management.
Changes:
- Added two GitHub Actions workflows that use Copilot CLI to analyze commits
- Created prompt files to guide Copilot's analysis of documentation needs and test coverage
- Added comprehensive lab documentation explaining the rationale and usage of each workflow
- Included a setup workflow for defining Copilot agent prerequisites
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/copilot.generate-tests.yml |
Workflow that triggers on push to analyze commits for missing test coverage and creates issues |
.github/workflows/copilot.generate-docs.yml |
Workflow that triggers on push to analyze commits for documentation needs and creates issues |
.github/workflows/copilot-setup-steps.yml |
Setup workflow defining prerequisites for Copilot agent operations |
.github/prompts/analyze-for-tests.prompt.md |
Detailed prompt instructing Copilot how to analyze code for test coverage gaps |
.github/prompts/analyze-for-docs.prompt.md |
Prompt instructing Copilot how to analyze code for documentation needs |
labs/workflows/copilot.generate-tests.md |
Comprehensive documentation explaining the test generation workflow |
labs/workflows/copilot.generate-docs.md |
Comprehensive documentation explaining the documentation generation workflow |
| - Patch dependency updates | ||
| in the current repository |
There was a problem hiding this comment.
Line 30 contains a fragment "in the current repository" that appears disconnected from the surrounding context. This line should either be removed or integrated into the previous bullet point about patch dependency updates.
| - Patch dependency updates | |
| in the current repository | |
| - Patch dependency updates in the current repository |
| in the current repository | ||
| - Add labels: `documentation`, `automated` | ||
| 3. **If documentation is needed:** | ||
| - Use the GitHub MCP server to create a GitHub issue with title: "📚 Documentation needed for commit test" |
There was a problem hiding this comment.
The hardcoded issue title "Documentation needed for commit test" should use a dynamic placeholder that reflects the actual commit content, such as "Documentation needed for commit {COMMIT_SHA}" or include a brief description of the changes.
| - Use the GitHub MCP server to create a GitHub issue with title: "📚 Documentation needed for commit test" | |
| - Use the GitHub MCP server to create a GitHub issue with title: "📚 Documentation needed for commit {COMMIT_SHA}" |
| GH_TOKEN: ${{ secrets.COPILOT_CLI_TOKEN }} | ||
| run: | | ||
| echo "Analyzing commit ${{ github.sha }} for test coverage..." | ||
| echo "Source files changed: ${{ steps.changes.outputs.source_count }}" |
There was a problem hiding this comment.
The workflow references steps.changes.outputs.source_count but there is no step with id 'changes' defined in this workflow. This will output an empty value and could cause confusion during debugging.
| echo "- Copilot will create an issue and assign it to itself if needed" | ||
| echo "" | ||
|
|
||
| copilot -p "$PROMPT" --enable-all-github-mcp-tools --allow-all-tools |
There was a problem hiding this comment.
The copilot.generate-docs.yml workflow is missing the --no-ask-user flag that is present in copilot.generate-tests.yml. For consistency in automated workflows, both should include this flag to prevent interactive prompts that could cause the workflow to hang.
| copilot -p "$PROMPT" --enable-all-github-mcp-tools --allow-all-tools | |
| copilot -p "$PROMPT" --enable-all-github-mcp-tools --allow-all-tools --no-ask-user |
… creation Co-authored-by: raykao <860691+raykao@users.noreply.github.com>
Add explicit permissions to Copilot workflows
Added prompts that will be used by GH Action Workflows to run essentially custom agents within a GitHub Action that can be arbitrarily executed/called after code has been committed and pushed to the repo.
Lab documentation has also been added to explain the rationale for each of the prompts and workflows.
A potential todo item is to split these into their own subfolders and then also split the rationale for the prompt and workflow separately to be run in a lab/workshop format.