Skip to content

Sync repo CI/CD and docs to ProjectTemplate standards#130

Merged
ptr727 merged 5 commits into
developfrom
sync-template-standards
May 12, 2026
Merged

Sync repo CI/CD and docs to ProjectTemplate standards#130
ptr727 merged 5 commits into
developfrom
sync-template-standards

Conversation

@ptr727

@ptr727 ptr727 commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

Re-syncs this repo's CI/CD and contributor docs to the current ptr727/ProjectTemplate standards.

  • Branch rulesets split via gh api (already applied out-of-band): new Main ruleset (merge-only, no linear history, status checks non-strict) + existing ruleset narrowed to Develop (squash-only, linear history, strict).
  • Dependabot: dual-target every ecosystem (main + develop).
  • merge-bot: three-job model (enable on opened/reopened, disable on maintainer-pushed synchronize), App token, branch-aware merge (--squash on develop, --merge on main), cancel-in-progress: false.
  • codegen: matrix over main/develop producing codegen-main/codegen-develop PRs, App token, close/reopen dance removed.
  • build-release: explicit target_commitish: ${{ github.sha }}; prerelease via github.ref_name.
  • All actions SHA-pinned (dotnet/nbgv@master is a documented exception).
  • AGENTS.md adopts template sections (Git rules, branching, PR conventions, review etiquette, workflow YAML conventions).
  • .github/copilot-instructions.md prepended with Copilot Review Runbook.
  • README.md adds Contributing section (branching + repo setup).

Old WORKFLOW_PAT secret and codegen branch can be deleted after this lands.

Test plan

  • CI green on the PR.
  • Squash-merge to develop succeeds under new Develop ruleset.
  • Subsequent develop → main PR routes through merge-commit.
  • Next Dependabot run opens parallel PRs against both branches.
  • Next codegen run opens codegen-main → main and codegen-develop → develop PRs.

Copilot AI review requested due to automatic review settings May 12, 2026 18:20

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

Synchronizes this repository’s CI/CD workflows and contributor-facing documentation with the ptr727/ProjectTemplate standards, including dual-branch automation (main/develop) and more deterministic bot-driven merges/releases.

Changes:

  • Updated GitHub Actions workflows to SHA-pin actions, align naming/conposition conventions, and adjust release/codegen/merge-bot behavior for a main+develop branch model.
  • Expanded Dependabot configuration to open parallel update PRs against both main and develop.
  • Refreshed contributor/agent documentation (AGENTS/README/Copilot instructions) to codify branching, review, and workflow conventions.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Adds a Contributing section documenting the two-branch workflow and required secrets.
AGENTS.md Replaces/expands agent guidance with authoritative branching, review etiquette, and workflow conventions.
.github/workflows/test-release-task.yml Pins actions and hardens shell execution for the reusable “test release” workflow.
.github/workflows/test-pull-request.yml Updates PR branch filters for the new codegen branch names and hardens shell execution.
.github/workflows/run-periodic-codegen-pull-request.yml Updates scheduling workflow to call the new matrix codegen task and adjusts concurrency.
.github/workflows/run-codegen-pull-request-task.yml Refactors codegen into a main/develop matrix using an App token and removes the close/reopen dance.
.github/workflows/merge-bot-pull-request.yml Reworks merge-bot into a 3-job model with App token usage and base-branch-dispatched merge method.
.github/workflows/get-version-task.yml Pins actions and documents the intentional dotnet/nbgv@master exception.
.github/workflows/build-release-task.yml Pins actions and fixes release tagging via explicit target_commitish, plus prerelease logic.
.github/workflows/build-library-task.yml Pins actions, hardens shell execution, and updates branch-based configuration selection.
.github/workflows/build-datebadge-task.yml Pins BYOB action and hardens shell execution; gates badge updates to main.
.github/dependabot.yml Dual-targets main + develop for nuget and github-actions with grouped daily updates.
.github/copilot-instructions.md Prepends a Copilot review runbook and points to AGENTS.md as canonical process guidance.

Comment thread .github/workflows/run-periodic-codegen-pull-request.yml Outdated
Codegen task always writes to fixed branches `codegen-main` and `codegen-develop`. Ref-scoped concurrency would let a `workflow_dispatch` from a non-default ref race with the scheduled run.

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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread AGENTS.md Outdated
Comment thread .github/workflows/merge-bot-pull-request.yml Outdated
…rge-bot trigger

- AGENTS.md: soften 'single source of truth' to acknowledge that copilot-instructions.md owns review mechanics by explicit delegation and README's high-level summary is allowed.
- merge-bot: switch trigger from pull_request to pull_request_target so action SHAs used to mint App-token come from the trusted base ref, not from a (possibly unreviewed) PR head. Workflow never checks out PR code so the standard pull_request_target warning doesn't apply.

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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/build-library-task.yml
publish-release.yml fires on push to both main and develop and passes `nuget: true` either way, but the build configuration was gated on `ref_name == 'main'` — so Debug-built NuGet packages were being pushed as develop pre-releases. Switch the gate to `inputs.push` so any publish run uses Release; non-publishing test runs still build Debug.

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

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

@ptr727 ptr727 merged commit a123281 into develop May 12, 2026
10 checks passed
@ptr727 ptr727 deleted the sync-template-standards branch May 12, 2026 19:04
ptr727 added a commit that referenced this pull request May 12, 2026
Release: sync to ProjectTemplate standards (#130)
ptr727 added a commit that referenced this pull request May 12, 2026
The GitHub App credential secret is stored as `CODEGEN_APP_CLIENT_ID` in
both Actions and Dependabot stores, but the workflows that landed in
#130 referenced `CODEGEN_APP_ID` (the template's name). With the wrong
name, `actions/create-github-app-token` gets an empty `app-id` and the
merge-bot + codegen fail on first invocation.
`actions/create-github-app-token` v1.12+ accepts either an App ID or a
Client ID at the `app-id` input, so this is a pure secret-lookup fix.
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