Conversation
- Refactor conditions in merge-bot workflows to improve security and prevent abuse. - Introduce new workflow for running codegen app and creating pull requests. - Add periodic workflow for running codegen app weekly. - Update README with detailed instructions on using GitHub App for codegen. - Modify date in CodeGen class for accurate quote generation. Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
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 repository’s CodeGen automation by adding an App-based workflow path alongside the existing PAT-based path, tightening merge-bot conditions to reduce abuse potential, and documenting the updated operational/security expectations for automated agents.
Changes:
- Added a GitHub App–based reusable workflow + scheduled runner, and updated merge-bot logic to auto-merge App-authored codegen PRs safely.
- Hardened existing workflow conditions (notably same-repo checks and repository-owner gating for PAT reopen events) and documented both auth paths + schedules.
- Updated CodeGen utilities (HttpClient factory behavior/comments and generated quote timestamp) and added explicit Git/commit rules for AI agents.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents PAT vs GitHub App codegen workflows, auto-merge conditions, and weekly schedules. |
| CodeGen/HttpClientFactory.cs | Adjusts handler/client construction to allow per-client resilience state; adds suppression/commentary. |
| CodeGen/CodeGen.cs | Updates the generated quote timestamp constant. |
| AGENTS.md | Adds Git/commit safety rules for AI agents. |
| .github/workflows/run-periodic-codegen-pull-request.yml | Clarifies schedule comment for the PAT-based weekly run. |
| .github/workflows/run-periodic-codegen-app-pull-request.yml | Introduces a weekly scheduled workflow that calls the App-based reusable task. |
| .github/workflows/run-codegen-pull-request-task.yml | Adds clarifying comments around GITHUB_TOKEN vs PAT usage. |
| .github/workflows/run-codegen-app-pull-request-task.yml | Adds reusable workflow that generates an App token, runs codegen, formats, and opens a PR. |
| .github/workflows/merge-bot-pull-request.yml | Hardens merge conditions and adds a dedicated job for App-based codegen PR auto-merge. |
| .github/copilot-instructions.md | Adds “Git and Commit Rules” guidance for AI coding agents. |
…documentation Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
ptr727
added a commit
that referenced
this pull request
Apr 13, 2026
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> Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
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.