Conversation
Improve security and prevent abuse in merge-bot workflows. Introduce a new workflow for running the codegen app and creating pull requests, along with a periodic workflow for weekly execution. Update documentation to include Git and commit rules for AI coding agents. Adjust date in the CodeGen class for accurate quote generation. --------- Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens and expands the automation around CodeGen PR creation and auto-merge, adding an alternative GitHub App authentication path alongside the existing PAT approach, and documenting the operational/security rationale.
Changes:
- Added a scheduled GitHub App–based CodeGen workflow and corresponding reusable workflow task.
- Hardened merge-bot conditions to reduce abuse risk (same-repo checks, actor constraints) and updated docs accordingly.
- Updated CodeGen internals and documentation for agent git/commit constraints and corrected generated quote timestamp.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents PAT vs GitHub App flows, auto-merge conditions, and the weekly schedule. |
| CodeGen/HttpClientFactory.cs | Refactors resilience handler creation and exposes CreateHttpClient() internally. |
| CodeGen/CodeGen.cs | Updates generated quote timestamp value. |
| AGENTS.md | Adds “Git and Commit Rules” for AI agents. |
| .github/workflows/run-periodic-codegen-pull-request.yml | Adjusts schedule comment and concurrency group for PAT-based weekly codegen. |
| .github/workflows/run-periodic-codegen-app-pull-request.yml | Adds weekly scheduled workflow using GitHub App credentials. |
| .github/workflows/run-codegen-pull-request-task.yml | Adds clarifying comments for PAT/GITHUB_TOKEN usage. |
| .github/workflows/run-codegen-app-pull-request-task.yml | Adds reusable workflow to run codegen and open PR using a GitHub App token. |
| .github/workflows/merge-bot-pull-request.yml | Tightens auto-merge if: guards and adds merge path for app-created codegen PRs. |
| .github/copilot-instructions.md | Adds “Git and Commit Rules” guidance for AI agents. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve security and prevent abuse in merge-bot workflows. Introduce a new workflow for running the codegen app and creating pull requests, along with a periodic workflow for weekly execution. Update documentation to include Git and commit rules for AI coding agents. Adjust date in the CodeGen class for accurate quote generation.
Signed-off-by: Pieter Viljoen ptr727@users.noreply.github.com