Skip to content

Align dependabot, merge-bot, release flow, and SHA-pin all actions#692

Merged
ptr727 merged 6 commits into
developfrom
pull-project-alignment
May 7, 2026
Merged

Align dependabot, merge-bot, release flow, and SHA-pin all actions#692
ptr727 merged 6 commits into
developfrom
pull-project-alignment

Conversation

@ptr727
Copy link
Copy Markdown
Owner

@ptr727 ptr727 commented May 7, 2026

Summary

Brings PlexCleaner in line with the dual-publish "pull project" pattern adopted by ptr727/ProjectTemplate and ptr727/homeassistant-purpleair.

  • dependabot.yml: also targets develop so both auto-publishing branches stay in sync.
  • merge-bot-pull-request.yml: branch-aware merge method (squash for develop, merge for main) + App-token auth so post-merge pushes trigger publish workflows on develop instead of being skipped by GitHub's recursion guard.
  • build-release-task.yml: target_commitish=github.sha so release tags land on the triggering commit (not main's tip when triggered from develop) + fail_on_unmatched_files.
  • All workflows: every third-party action pinned to a commit SHA with # vX.Y.Z comment; dotnet/nbgv@master replaced with @v0.5.1.
  • AGENTS.md + copilot-instructions.md: document branch flow, merge strategy split, dual-publish release flow, dependabot rationale, merge-bot design, and SHA-pinning policy.

Branch rulesets and repo merge settings have already been updated via gh api to match (rebase disabled, auto-merge enabled, develop = squash-only + linear history, main = merge-only, both with Check pull request workflow status as the required check).

Test plan

  • CI green (test-pull-request workflow)
  • Copilot review threads resolved (required by ruleset)
  • Squash-merge into develop (only method allowed by new develop ruleset) → triggers publish-release.yml and produces a develop prerelease
  • Confirm release tag points at the develop commit SHA (verifies target_commitish fix)

🤖 Generated with Claude Code

ptr727 and others added 3 commits May 7, 2026 12:51
- dependabot.yml: also target develop so both auto-publishing branches
  stay on the same baseline.
- merge-bot-pull-request.yml: branch-aware merge method (squash for
  develop, merge for main) and App-token auth so post-merge pushes
  trigger publish-release and publish-periodic-docker-release on
  develop instead of being skipped by GitHub's recursion guard.
- build-release-task.yml: set target_commitish=github.sha so release
  tags land on the triggering commit, not the repo default branch;
  fail_on_unmatched_files; pin softprops/action-gh-release to v3.0.0.
- AGENTS.md: document the feature->develop->main flow, develop->main
  promotion via merge commit, dual-publish release flow, dependabot
  rationale, and merge-bot design.
- copilot-instructions.md: terse summary section pointing at AGENTS.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace floating major-version refs (@v5/@v6/@v7/@v8/@v3/@v4/@v1) and
the @master ref on dotnet/nbgv with full commit SHAs plus version
comments, matching the pattern already used for create-github-app-token,
fetch-metadata, and softprops/action-gh-release. Pins make supply-chain
attacks via tag mutation impossible and let dependabot bump them
mechanically.

Also drops the verbose target_commitish rationale comment from
build-release-task.yml; the field is self-explanatory in this repo's
context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit pinned every third-party action to a commit SHA but
didn't capture the rule itself. Add a "GitHub Actions pinning" section
to AGENTS.md explaining what to pin, why floating tags are unsafe, and
how to resolve a SHA when adding a new action. Add a one-line summary
to copilot-instructions.md so AI agents don't reintroduce floating
refs in suggestions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 7, 2026 20:06
Copy link
Copy Markdown

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

Updates PlexCleaner’s automation to match a dual-branch (develop/main) “pull project” release model, with bot-driven dependency maintenance and hardened GitHub Actions usage (SHA-pinning).

Changes:

  • Extend Dependabot to target both main and develop, and update merge-bot behavior to be branch-aware (squash to develop, merge-commit to main) using an App token.
  • Fix release tagging behavior by setting target_commitish: ${{ github.sha }} and tighten release asset upload behavior with fail_on_unmatched_files.
  • Pin third-party GitHub Actions to immutable commit SHAs across workflows and document the branch/release/bot policies.

Reviewed changes

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

Show a summary per file
File Description
AGENTS.md Documents branch flow, release flow, dependabot rationale, merge-bot design, and SHA-pinning policy.
.github/copilot-instructions.md Adds concise guidance for agents on branching/release strategy and action pinning.
.github/dependabot.yml Adds parallel Dependabot update configs for develop in addition to main.
.github/workflows/merge-bot-pull-request.yml Uses App token and selects merge method based on base branch rules.
.github/workflows/build-release-task.yml Pins actions; ensures release tags target the triggering commit and fails on missing assets.
.github/workflows/get-version-task.yml Pins actions and replaces floating dotnet/nbgv@master with a versioned SHA pin.
.github/workflows/build-executable-task.yml Pins setup-dotnet/checkout/artifact actions.
.github/workflows/build-docker-task.yml Pins docker setup/login/build actions.
.github/workflows/publish-periodic-docker-release.yml Pins actions for docker-run, artifacts, checkout, download-artifact, and dockerhub description.
.github/workflows/build-datebadge-task.yml Pins BYOB action to a commit SHA.
.github/workflows/test-release-task.yml Pins setup-dotnet and checkout actions.

Comment thread .github/workflows/publish-periodic-docker-release.yml Outdated
Comment thread .github/workflows/publish-periodic-docker-release.yml Outdated
Every other workflow file in the repo uses the over-indented YAML style
where list items under `steps:` are at parent_indent+2 (e.g., `steps:`
at column 4, `- name:` at column 6). This file alone used the compact
style with both at the same column. Both are valid YAML and GitHub
Actions accepts either, but consistency matters more than syntactic
flexibility. Bring this file in line with the other six.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

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

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

Comment thread .github/workflows/merge-bot-pull-request.yml
Comment thread .github/workflows/publish-periodic-docker-release.yml
Two clarifications surfaced by Copilot review on PR #692:

1. The merge-bot uses an App token minted from CODEGEN_APP_*
   secrets. For Dependabot-authored pull_request events, GitHub only
   exposes secrets from the Dependabot namespace (Settings → Secrets
   → Dependabot), not the regular Actions namespace. The secrets must
   exist in both, or the App-token step gets empty inputs at runtime.
   This is non-obvious and worth calling out explicitly so future
   maintainers don't strip the Dependabot duplicate as redundant.

2. The SHA-pinning comment convention is "match the upstream release
   tag" — usually # vX.Y.Z, but # v3 (or # master) when upstream only
   publishes major-only / branch tags. Don't fabricate a semver
   suffix; use what gh api repos/<owner>/<repo>/releases/latest
   returns as tag_name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ptr727 ptr727 merged commit 478e0a7 into develop May 7, 2026
16 checks passed
@ptr727 ptr727 deleted the pull-project-alignment branch May 7, 2026 20:38
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