Skip to content

Copier update: workflow summary#87

Merged
ejfine merged 2 commits intomainfrom
cop-workflew
Mar 31, 2026
Merged

Copier update: workflow summary#87
ejfine merged 2 commits intomainfrom
cop-workflew

Conversation

@ejfine
Copy link
Copy Markdown
Contributor

@ejfine ejfine commented Mar 31, 2026

Pull in upstream template changes

Tested in downstream repos, including LabAutomationAndScreening/cloud-courier#51

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced CI/CD pipeline with duplicate pull request detection to prevent redundant checks
    • Added template version validation workflow for release tag enforcement
  • Chores

    • Updated devcontainer base image and VS Code extensions to latest versions
    • Updated development tool dependencies (pnpm, Pulumi, and related packages)
    • Improved GitHub CLI permission rules for enhanced security controls
    • Added optional Pulumi CLI installation skipping for faster setup
  • Documentation

    • Expanded developer testing guidelines with isolation patterns and mock/spy assertions
    • Enhanced tooling best practices with explicit command execution preferences

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

This PR updates the Copier template infrastructure from v0.0.106 to v0.0.109, refines GitHub CLI bash permissions with explicit deny rules, adds new CI workflows for duplicate-push and copier-template validation checks, replaces hardcoded repository paths with dynamic script-based resolution in dev setup, updates DevContainer images and extension versions, introduces a conditional Pulumi CLI installation flag, and enhances agent/testing documentation guidelines.

Changes

Cohort / File(s) Summary
Bash Permissions Configuration
.claude/settings/permissions/bash.jsonc, template/.claude/settings/permissions/bash.jsonc
Added read-only gh actions (issue list, pr view, pr diff); narrowed ask permissions from broad gh * to specific subcommands (repo, release, secret, ruleset); introduced explicit deny rules for PR lifecycle operations (create, edit, review, merge, close, comment, etc.).
CodeRabbit Review Configuration
.coderabbit.yaml, template/.coderabbit.yaml
Added path instructions for .copier-answers.yml specifying that reviewers must not comment on _commit values requiring clean release tags, as CI enforces this constraint.
Copier Template Version
.copier-answers.yml, template/.copier-answers.yml
Updated template version reference from v0.0.106 to v0.0.109.
DevContainer Base Image
.devcontainer/Dockerfile, template/.devcontainer/Dockerfile
Updated base image from mcr.microsoft.com/devcontainers/universal:5.1.4-noble to 5.1.5-noble.
DevContainer Configuration
.devcontainer/devcontainer.json, template/.devcontainer/devcontainer.json.jinja
Added hostRequirements block specifying 2 CPUs and 4GB memory; updated VS Code extension versions (Copilot Chat, Claude Code, Python, Pylance, Ruff, Prettier, ESLint).
Dev Dependency Installation
.devcontainer/install-ci-tooling.py
Updated pinned pnpm version from 10.32.1 to 10.33.0.
Dev Setup Scripts with Pulumi Skip Flag
.devcontainer/manual-setup-deps.py, template/.devcontainer/manual-setup-deps.py
Added new --skip-installing-pulumi-cli CLI flag; conditional Pulumi CLI installation after uv sync (on Linux when lock file contains "pulumi" and flag not set).
GitHub Actions: Install Dependencies
.github/actions/install_deps/action.yml, template/.github/actions/install_deps/action.yml
Added boolean input skip-installing-pulumi-cli (default false); conditional flag appended to .devcontainer/manual-setup-deps.py invocation.
Dynamic Repository Path Resolution
.devcontainer/on-create-command.sh, .devcontainer/post-start-command.sh, template/.devcontainer/on-create-command.sh.jinja, template/.devcontainer/post-start-command.sh.jinja
Replaced hardcoded git safe.directory paths with dynamically computed script_dir and repo_root derived from script location; consolidated path variable definitions.
New CI Workflow: Check Skip Duplicates
.github/actions/check-skip-duplicates/action.yml
New composite action that detects open pull requests on the current branch using gh pr list; outputs should-run: false if a PR exists (skip push CI), true otherwise; skips check for non-push events.
New Copier Template Validation Workflow
.github/workflows/confirm-on-tagged-copier-template.yaml, template/.github/workflows/confirm-on-tagged-copier-template.yaml
New reusable workflow validating that .copier-answers.yml _commit is a clean release tag (no hyphens); fails workflow if commit contains dev tag format.
CI Workflow Refactoring
.github/workflows/ci.yaml, template/.github/workflows/ci.yaml.jinja
Added pull_request trigger; integrated check-skip-duplicate job to gate downstream jobs (pre-commit, unit-test, lint); replaced required-check job with confirm-on-tagged-copier-template (PR/merge-group only) and workflow-summary (aggregates all jobs); added status update step marking required-check as success for pull_request/merge_group via GitHub Status API.
Pre-commit Workflow
.github/workflows/pre-commit.yaml, template/.github/workflows/pre-commit.yaml
Added skip-installing-pulumi-cli: true input to install_deps action alongside existing skip-installing-ssm-plugin-manager.
Tag Automation Workflow
.github/workflows/tag-on-merge.yaml
Updated actions/checkout from v6.0.1 to v6.0.2; switched tag-action from mathieudutour/github-tag-action to nickkostov/github-tag-action.
Tool Version Updates
extensions/context.py
Bumped pinned versions: pnpm (10.32.1 → 10.33.0), pulumi (>=3.226.0 → >=3.228.0), pulumi_aws_native (>=1.57.0 → >=1.59.0), pulumi_okta (>=6.2.3 → >=6.4.0), nuxt_ui (^4.5.1 → ^4.6.0), faker (^10.3.0 → ^10.4.0), graphql_codegen_cli (^6.1.0 → ^6.2.1).
Agent & Testing Guidance
AGENTS.md, template/AGENTS.md
Expanded testing section with single-test iteration patterns (pytest node IDs, TypeScript -t flag); refined mock/spy assertion constraints (exact-once preference, then multi-call ordered assertions); added Frontend Testing subsection with data-testid uniqueness and DOM query scoping rules; replaced permissive tooling language with explicit prohibitions (never use python3/python directly, never use for one-off tasks); changed command chaining from absolute paths to cd as separate tool call; banned directory-targeting flags (pnpm --prefix, uv --directory).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • PR #71: Modifies .copier-answers.yml _commit field and updates multiple tool versions in extensions/context.py, directly overlapping with template version and dependency pinning changes.
  • PR #80: Updates extensions/context.py tool/version pins and modifies DevContainer configuration files (Dockerfile, devcontainer.json, install scripts), sharing common refactoring patterns.
  • PR #75: Contains overlapping template configuration updates (.coderabbit.yaml, .copier-answers.yml, DevContainer files, CI action inputs), indicating related maintenance efforts.

Suggested reviewers

  • idonaldson
  • zendern
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description is minimal and lacks required template sections including issue links, motivation, implementation details, side effects, and testing information. Complete the description template by adding sections for: Link to Issue, Why this change is necessary, How it addresses the issue, What side effects exist, and How it is tested.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Copier update: workflow summary' accurately reflects the primary changes, which involve updating workflow configuration files and Copier template versions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.devcontainer/manual-setup-deps.py:
- Around line 136-146: The code calls subprocess.run on REPO_ROOT_DIR /
".devcontainer" / "install-pulumi-cli.sh" when generate_lock_file_only is false,
args.skip_installing_pulumi_cli is false and env.lock_file contains "pulumi",
but that script is missing and will raise CalledProcessError; fix by either
adding the missing script at .devcontainer/install-pulumi-cli.sh or by guarding
the call with a file-existence check (e.g. verify (REPO_ROOT_DIR /
".devcontainer" / "install-pulumi-cli.sh").exists()) and only invoking
subprocess.run when the script exists, or remove this installation branch
entirely so generate_lock_file_only / args.skip_installing_pulumi_cli /
env.lock_file logic does not attempt to run a non-existent installer
(references: generate_lock_file_only, args.skip_installing_pulumi_cli,
env.lock_file, and the install-pulumi-cli.sh path).

In @.github/actions/check-skip-duplicates/action.yml:
- Around line 1-44: The gh pr list call in the composite action's check step
requires pull-requests: read permission, so update the job that uses this
composite action (the check-skip-duplicate job) to include a permissions block
granting pull-requests: read; specifically, in the workflow where you declare
the check-skip-duplicate job (the job with outputs.should-run and the step id
"check"), add permissions: pull-requests: read so the "gh pr list" command
invoked in the action's step (id "check") can run successfully.

In @.github/workflows/ci.yaml:
- Around line 232-241: The workflow step "Mark the required-check as succeeded
so the PR can be merged" uses github.event.pull_request.statuses_url which is
only present for pull_request events; modify the step's if condition so it only
runs when a pull_request payload exists (e.g. change the if to check
github.event.pull_request != null or restrict to github.event_name ==
'pull_request') or otherwise short-circuit by first deriving statuses_url into
an env only if github.event.pull_request is defined and skip the API call when
it is undefined; update the step referenced by its name and the use of
github.event.pull_request.statuses_url accordingly.

In @.github/workflows/confirm-on-tagged-copier-template.yaml:
- Around line 29-34: The current hyphen-based rejection (checking COMMIT_LINE
from ANSWERS_FILE with grep -q "-") incorrectly rejects valid prerelease semver
(e.g., v1.0.0-alpha); change the check to detect the specific git-describe dev
suffix pattern instead (match "-<number>-g<hash>", e.g. -[0-9]+-g[0-9a-f]+)
using a precise regex (grep -E or similar) against COMMIT_LINE, and update the
error message to mention that only git-describe style dev commits are rejected
while allowing prerelease tags.

In @.github/workflows/tag-on-merge.yaml:
- Around line 22-24: The workflow step "Bump version and push tag" references a
non-existent fork nickkostov/github-tag-action@b3aa34... which will break CI;
replace that action reference with a valid, existing action such as
mathieudutour/github-tag-action@v1 (or a verified commit/tag) or remove the step
if tagging is handled elsewhere, and update the comment that incorrectly claims
lack of Node 20 support; ensure you change the uses: line to point at
mathieudutour/github-tag-action (or another verified fork) and keep any required
inputs the same so the step continues to work.

In `@template/.github/workflows/ci.yaml.jinja`:
- Around line 219-228: The "Mark the required-check as succeeded so the PR can
be merged" step uses github.event.pull_request.statuses_url but also runs for
merge_group events, and statuses_url is undefined for merge_group; either
restrict the step condition to only pull_request, or add branching so the gh api
call uses github.event.pull_request.statuses_url when the event is pull_request
and constructs the statuses API URL from the merge_group head SHA
(github.event.merge_group.head_sha) when the event is merge_group before calling
gh api; update the step condition or add an if/else that selects the correct URL
and keeps the gh api invocation (gh api ... -X POST ...) unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c40c48b4-84a0-479c-9cef-93ce36e5a3a7

📥 Commits

Reviewing files that changed from the base of the PR and between 747600a and 93c5fcb.

📒 Files selected for processing (29)
  • .claude/settings/permissions/bash.jsonc
  • .coderabbit.yaml
  • .copier-answers.yml
  • .devcontainer/Dockerfile
  • .devcontainer/devcontainer.json
  • .devcontainer/install-ci-tooling.py
  • .devcontainer/manual-setup-deps.py
  • .devcontainer/on-create-command.sh
  • .devcontainer/post-start-command.sh
  • .github/actions/check-skip-duplicates/action.yml
  • .github/actions/install_deps/action.yml
  • .github/workflows/ci.yaml
  • .github/workflows/confirm-on-tagged-copier-template.yaml
  • .github/workflows/pre-commit.yaml
  • .github/workflows/tag-on-merge.yaml
  • AGENTS.md
  • extensions/context.py
  • template/.claude/settings/permissions/bash.jsonc
  • template/.coderabbit.yaml
  • template/.devcontainer/Dockerfile
  • template/.devcontainer/devcontainer.json.jinja
  • template/.devcontainer/manual-setup-deps.py
  • template/.devcontainer/on-create-command.sh.jinja
  • template/.devcontainer/post-start-command.sh.jinja
  • template/.github/actions/install_deps/action.yml
  • template/.github/workflows/ci.yaml.jinja
  • template/.github/workflows/confirm-on-tagged-copier-template.yaml
  • template/.github/workflows/pre-commit.yaml
  • template/AGENTS.md

Comment on lines +136 to +146
if (
not generate_lock_file_only
and not args.skip_installing_pulumi_cli
and platform.system() == "Linux"
and env.lock_file.exists()
and '"pulumi"' in env.lock_file.read_text()
):
_ = subprocess.run(
["sh", str(REPO_ROOT_DIR / ".devcontainer" / "install-pulumi-cli.sh"), str(env.lock_file)],
check=True,
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the install script exists
fd -t f 'install-pulumi-cli.sh' .devcontainer

# Check the script's expected arguments
cat .devcontainer/install-pulumi-cli.sh 2>/dev/null | head -30

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 82


🏁 Script executed:

#!/bin/bash
# List all files in .devcontainer directory
echo "=== All files in .devcontainer ===" 
fd -t f . .devcontainer

echo -e "\n=== Search for any install or pulumi related scripts ===" 
rg -l 'install|pulumi' .devcontainer --type sh 2>/dev/null || echo "No matches found"

echo -e "\n=== Check if .devcontainer directory exists ===" 
ls -la .devcontainer/ 2>/dev/null || echo ".devcontainer directory not found"

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 1693


🏁 Script executed:

#!/bin/bash
# Search for any references to install-pulumi-cli in the codebase
echo "=== References to install-pulumi-cli ===" 
rg 'install-pulumi-cli' . --type py --type sh

echo -e "\n=== Context around line 136-146 in manual-setup-deps.py ===" 
head -150 .devcontainer/manual-setup-deps.py | tail -30

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 1672


The Pulumi CLI install script referenced at line 139 does not exist in the repository.

The file .devcontainer/install-pulumi-cli.sh is missing. When the conditional logic evaluates to true (Linux platform, Pulumi in lock file, not skipping install), subprocess.run() with check=True will raise a CalledProcessError and crash the script. Either create the missing script or remove this installation logic.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.devcontainer/manual-setup-deps.py around lines 136 - 146, The code calls
subprocess.run on REPO_ROOT_DIR / ".devcontainer" / "install-pulumi-cli.sh" when
generate_lock_file_only is false, args.skip_installing_pulumi_cli is false and
env.lock_file contains "pulumi", but that script is missing and will raise
CalledProcessError; fix by either adding the missing script at
.devcontainer/install-pulumi-cli.sh or by guarding the call with a
file-existence check (e.g. verify (REPO_ROOT_DIR / ".devcontainer" /
"install-pulumi-cli.sh").exists()) and only invoking subprocess.run when the
script exists, or remove this installation branch entirely so
generate_lock_file_only / args.skip_installing_pulumi_cli / env.lock_file logic
does not attempt to run a non-existent installer (references:
generate_lock_file_only, args.skip_installing_pulumi_cli, env.lock_file, and the
install-pulumi-cli.sh path).

Comment on lines +1 to +44
name: Check Skip Duplicates
description: 'Check that will output a variable to allow you to skip duplicate runs. Example: If you have both push and pull_request triggers enabled and you dont want to run 2 jobs for the same commit if a PR is already open you can add this to your jobs to skip that extra execution.'

outputs:
should-run:
description: 'Flag that determines if this execution should run or not'
value: ${{ steps.check.outputs.should_run }}

runs:
using: composite
steps:
- name: Check if push has associated open PR
id: check
env:
GH_TOKEN: ${{ github.token }}
REF_NAME: ${{ github.ref_name }}
REPO_NAME: ${{ github.repository }}
EVENT_NAME: ${{ github.event_name }}
shell: bash
run: |
# For non-push events, always run
if [ "$EVENT_NAME" != "push" ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "Event is $EVENT_NAME, will run CI"
exit 0
fi

# For push events, check if there's an open PR for this branch
pr_json=$(gh pr list \
--repo "$REPO_NAME" \
--head "$REF_NAME" \
--state open \
--json number \
--limit 1)

pr_number=$(echo "$pr_json" | jq -r '.[0].number // ""')

if [ -n "$pr_number" ]; then
echo "should_run=false" >> $GITHUB_OUTPUT
echo "Push to branch with open PR #$pr_number detected, skipping (PR event will run CI)"
else
echo "should_run=true" >> $GITHUB_OUTPUT
echo "Push to branch without open PR, will run CI"
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the ci.yaml workflow has workflow-level permissions that would cover pull-requests: read
rg -n 'permissions:' -A 10 .github/workflows/ci.yaml | head -30

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 1155


🏁 Script executed:

# Check GitHub Actions documentation patterns and verify the output naming
# Look for any other composite actions in the repo to see how they handle outputs
fd -e yml -e yaml | xargs grep -l "outputs:" | head -5

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 82


🏁 Script executed:

# Get the full check-skip-duplicate job definition to see if it has a permissions block
sed -n '24,41p' .github/workflows/ci.yaml

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 602


Add pull-requests: read permission to the check-skip-duplicate job.

The gh pr list command requires pull-requests: read permission. The workflow-level permissions define id-token: write and contents: read, but do not include pull-requests: read. The check-skip-duplicate job does not override this with an explicit permissions block, so the gh pr list call will fail with insufficient permissions.

Add a permissions block to the job:

check-skip-duplicate:
  runs-on: ubuntu-24.04
  permissions:
    pull-requests: read
  outputs:
    should-run: ${{ steps.check.outputs.should-run }}

The rest of the action logic is sound—the handling of non-push events and the jq null-coalescing are correct.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/actions/check-skip-duplicates/action.yml around lines 1 - 44, The gh
pr list call in the composite action's check step requires pull-requests: read
permission, so update the job that uses this composite action (the
check-skip-duplicate job) to include a permissions block granting pull-requests:
read; specifically, in the workflow where you declare the check-skip-duplicate
job (the job with outputs.should-run and the step id "check"), add permissions:
pull-requests: read so the "gh pr list" command invoked in the action's step (id
"check") can run successfully.

Comment on lines +232 to +241
- name: Mark the required-check as succeeded so the PR can be merged
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-X POST -H "Accept: application/vnd.github.v3+json" \
"${{ github.event.pull_request.statuses_url }}" \
-f state=success -f context="required-check" -f description="✅ All required checks passed in the job triggered by pull_request" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

statuses_url is undefined for merge_group events.

Same issue as in the template: the condition includes merge_group, but github.event.pull_request.statuses_url only exists for pull_request events. This will cause the API call to fail during merge queue runs.

Proposed fix
       - name: Mark the required-check as succeeded so the PR can be merged
-        if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
+        if: ${{ github.event_name == 'pull_request' }}
         env:
           GH_TOKEN: ${{ github.token }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Mark the required-check as succeeded so the PR can be merged
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-X POST -H "Accept: application/vnd.github.v3+json" \
"${{ github.event.pull_request.statuses_url }}" \
-f state=success -f context="required-check" -f description="✅ All required checks passed in the job triggered by pull_request" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- name: Mark the required-check as succeeded so the PR can be merged
if: ${{ github.event_name == 'pull_request' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-X POST -H "Accept: application/vnd.github.v3+json" \
"${{ github.event.pull_request.statuses_url }}" \
-f state=success -f context="required-check" -f description="✅ All required checks passed in the job triggered by pull_request" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yaml around lines 232 - 241, The workflow step "Mark
the required-check as succeeded so the PR can be merged" uses
github.event.pull_request.statuses_url which is only present for pull_request
events; modify the step's if condition so it only runs when a pull_request
payload exists (e.g. change the if to check github.event.pull_request != null or
restrict to github.event_name == 'pull_request') or otherwise short-circuit by
first deriving statuses_url into an env only if github.event.pull_request is
defined and skip the API call when it is undefined; update the step referenced
by its name and the use of github.event.pull_request.statuses_url accordingly.

Comment on lines +29 to +34
COMMIT_LINE=$(grep "^_commit:" "$ANSWERS_FILE")
if echo "$COMMIT_LINE" | grep -q "-"; then
echo "Error: $COMMIT_LINE"
echo "_commit must be a clean release tag (e.g. v0.0.111), not a dev commit (e.g. v0.0.106-14-g7847d7b)"
exit 1
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider edge case: prerelease semver tags containing hyphens.

The hyphen check correctly rejects git-describe dev commits (e.g., v0.0.106-14-g7847d7b), but it would also reject valid prerelease tags like v1.0.0-alpha or v2.0.0-rc.1. If you only use simple numeric semver tags (as indicated by the example v0.0.111), this is fine. Otherwise, a more precise regex could distinguish git-describe format (which has the -<N>-g<hash> suffix pattern).

Optional: More precise git-describe detection
-          if echo "$COMMIT_LINE" | grep -q "-"; then
+          # git-describe format: v0.0.106-14-g7847d7b (tag-commits-gHASH)
+          if echo "$COMMIT_LINE" | grep -qE -- '-[0-9]+-g[0-9a-f]+'; then
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/confirm-on-tagged-copier-template.yaml around lines 29 -
34, The current hyphen-based rejection (checking COMMIT_LINE from ANSWERS_FILE
with grep -q "-") incorrectly rejects valid prerelease semver (e.g.,
v1.0.0-alpha); change the check to detect the specific git-describe dev suffix
pattern instead (match "-<number>-g<hash>", e.g. -[0-9]+-g[0-9a-f]+) using a
precise regex (grep -E or similar) against COMMIT_LINE, and update the error
message to mention that only git-describe style dev commits are rejected while
allowing prerelease tags.

Comment on lines 22 to 24
- name: Bump version and push tag
uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2
uses: nickkostov/github-tag-action@b3aa34b4ac9c7843ee609ba5d0b0a50b962647b9 # v1.3.0 # a fork of https://github.com/mathieudutour/github-tag-action, which is still on Node 20
with:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the tag matches the pinned commit SHA
gh api repos/nickkostov/github-tag-action/git/refs/tags/v1.3.0 --jq '.object.sha'
echo "Expected: b3aa34b4ac9c7843ee609ba5d0b0a50b962647b9"

# Check recent activity and stars for the fork
gh repo view nickkostov/github-tag-action --json stargazerCount,pushedAt,description

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 409


🌐 Web query:

nickkostov github-tag-action fork Node 22

💡 Result:

No evidence found of a GitHub repository or fork named "nickkostov/github-tag-action" or similar by user nickkostov related to Node.js 22. The query likely refers to a fork or PR for the popular github-tag-action (anothrNick/mathieudutour variants) updated for Node 22 compatibility. Key findings: - nick-kostov (from DataDog issue) and NikolayIT/nnkostov exist but no forks of github-tag-action. - mathieudutour/github-tag-action has PR #244 by nickkostov: "Upgrade to Node 24, enhance Semantic Release, and improve workflows" opened Mar 12, 2026 (future date, possibly preview). Also PR #243 "feat(node): Upgrading NodeJS version to 24". - anothrNick/github-tag-action upgraded to Node 20 (PR #308, Mar 2024), not 22. Node 22 support in GitHub Actions is partial (setup-node supports, but runs.using='node22' not fully until Node 24). - No direct "nickkostov" fork with Node 22. Closest is nickkostov PRs in mathieudutour fork for Node 24. If this refers to using the action with Node 22 runner, both main repos work as they use Docker/shell (anothrNick) or Node 20 (mathieudutour v6). For JS actions, specify runs: using: 'node20' or wait for node24 default (Mar 2026).

Citations:


🌐 Web query:

mathieudutour github-tag-action Node version support

💡 Result:

The mathieudutour/github-tag-action GitHub Action supports Node.js 20 as of its latest release v6.2 (March 2024). It was previously updated to Node 16 in October 2022, and a PR to upgrade to Node 20 was merged in March 2024 in response to Node 16 deprecation. A recent PR (March 2026) proposes upgrading to Node 24, indicating ongoing maintenance for current Node versions, but this is not yet released. The action runs on ubuntu-latest runners, which support Node 20+ via actions/setup-node.

Citations:


🏁 Script executed:

# Check the workflow file for additional context about this change
cd .github/workflows && cat -n tag-on-merge.yaml | head -30

Repository: LabAutomationAndScreening/copier-python-package-template

Length of output: 1013


Remove or replace the invalid action reference immediately—the fork does not exist.

The action nickkostov/github-tag-action at the referenced commit does not appear to have a public repository. Web searches and PR activity show that nickkostov made pull requests to the original mathieudutour/github-tag-action, but did not create a fork. This means the workflow will fail at runtime when attempting to use this non-existent action.

Additionally, the stated rationale is incorrect: mathieudutour/github-tag-action has supported Node 20 since March 2024 and is actively maintained (with a pending Node 24 upgrade PR). If the intent is to use an alternative or updated version, either restore the original mathieudutour/github-tag-action or identify and use a verified, existing fork.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/tag-on-merge.yaml around lines 22 - 24, The workflow step
"Bump version and push tag" references a non-existent fork
nickkostov/github-tag-action@b3aa34... which will break CI; replace that action
reference with a valid, existing action such as
mathieudutour/github-tag-action@v1 (or a verified commit/tag) or remove the step
if tagging is handled elsewhere, and update the comment that incorrectly claims
lack of Node 20 support; ensure you change the uses: line to point at
mathieudutour/github-tag-action (or another verified fork) and keep any required
inputs the same so the step continues to work.

Comment on lines +219 to +228
- name: Mark the required-check as succeeded so the PR can be merged
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-X POST -H "Accept: application/vnd.github.v3+json" \
"${{ github.event.pull_request.statuses_url }}" \
-f state=success -f context="required-check" -f description="✅ All required checks passed in the job triggered by pull_request" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

statuses_url is undefined for merge_group events.

The step condition includes merge_group, but github.event.pull_request.statuses_url is only populated for pull_request events. For merge_group events, this will be empty/undefined, causing the gh api call to fail.

Proposed fix: restrict to pull_request only or handle merge_group separately
       - name: Mark the required-check as succeeded so the PR can be merged
-        if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
+        if: ${{ github.event_name == 'pull_request' }}
         env:
           GH_TOKEN: ${{ github.token }}

If you need to mark status for merge_group, you'll need to construct the statuses URL differently using github.event.merge_group.head_sha.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Mark the required-check as succeeded so the PR can be merged
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-X POST -H "Accept: application/vnd.github.v3+json" \
"${{ github.event.pull_request.statuses_url }}" \
-f state=success -f context="required-check" -f description="✅ All required checks passed in the job triggered by pull_request" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- name: Mark the required-check as succeeded so the PR can be merged
if: ${{ github.event_name == 'pull_request' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
-X POST -H "Accept: application/vnd.github.v3+json" \
"${{ github.event.pull_request.statuses_url }}" \
-f state=success -f context="required-check" -f description="✅ All required checks passed in the job triggered by pull_request" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@template/.github/workflows/ci.yaml.jinja` around lines 219 - 228, The "Mark
the required-check as succeeded so the PR can be merged" step uses
github.event.pull_request.statuses_url but also runs for merge_group events, and
statuses_url is undefined for merge_group; either restrict the step condition to
only pull_request, or add branching so the gh api call uses
github.event.pull_request.statuses_url when the event is pull_request and
constructs the statuses API URL from the merge_group head SHA
(github.event.merge_group.head_sha) when the event is merge_group before calling
gh api; update the step condition or add an if/else that selects the correct URL
and keeps the gh api invocation (gh api ... -X POST ...) unchanged.

@ejfine ejfine marked this pull request as ready for review March 31, 2026 12:41
@ejfine ejfine requested review from idonaldson and zendern March 31, 2026 12:41
@ejfine ejfine merged commit 6df486c into main Mar 31, 2026
27 checks passed
@ejfine ejfine deleted the cop-workflew branch March 31, 2026 12:48
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.

1 participant