Skip to content

Raykao/sitoader agentic workflows#2

Merged
raykao merged 6 commits intomainfrom
raykao/sitoader-agentic-workflows
Jan 31, 2026
Merged

Raykao/sitoader agentic workflows#2
raykao merged 6 commits intomainfrom
raykao/sitoader-agentic-workflows

Conversation

@raykao
Copy link
Contributor

@raykao raykao commented Jan 30, 2026

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.

  • Prompts: [analyze-for-docs, analyze-for-tests]
  • Workflow: [copilot.generate-docs, copilot.generate-tests]

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.

@raykao raykao requested a review from Copilot January 30, 2026 05:12
@raykao raykao self-assigned this Jan 30, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Comment on lines +29 to +30
- Patch dependency updates
in the current repository
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- Patch dependency updates
in the current repository
- Patch dependency updates in the current repository

Copilot uses AI. Check for mistakes.
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"
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- 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}"

Copilot uses AI. Check for mistakes.
GH_TOKEN: ${{ secrets.COPILOT_CLI_TOKEN }}
run: |
echo "Analyzing commit ${{ github.sha }} for test coverage..."
echo "Source files changed: ${{ steps.changes.outputs.source_count }}"
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI commented Jan 30, 2026

@raykao I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits January 30, 2026 05:27
… creation

Co-authored-by: raykao <860691+raykao@users.noreply.github.com>
Add explicit permissions to Copilot workflows
@raykao raykao merged commit 0766c07 into main Jan 31, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants