Skip to content

Enhance GitHub workflows for code generation and auto-merge - #43

Merged
ptr727 merged 3 commits into
developfrom
tryagain
Apr 13, 2026
Merged

Enhance GitHub workflows for code generation and auto-merge#43
ptr727 merged 3 commits into
developfrom
tryagain

Conversation

@ptr727

@ptr727 ptr727 commented Apr 13, 2026

Copy link
Copy Markdown
Owner

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.

ptr727 added 2 commits April 13, 2026 13:03
- 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>
Copilot AI review requested due to automatic review settings April 13, 2026 20:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread .github/workflows/run-periodic-codegen-app-pull-request.yml Outdated
Comment thread .github/workflows/run-periodic-codegen-app-pull-request.yml Outdated
Comment thread AGENTS.md Outdated
…documentation

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
@ptr727
ptr727 merged commit 5872f60 into develop Apr 13, 2026
20 checks passed
@ptr727
ptr727 deleted the tryagain branch April 13, 2026 22:08
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>
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