-
Notifications
You must be signed in to change notification settings - Fork 1
Copier update: fail on dev tag CI job #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
419af7e
f3cb5ec
46474cf
dac3fbe
090e238
9448f1b
f9bdbc8
09b4307
c0f8ac2
ac6c7e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Confirm using tagged copier template version | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| answers_file: | ||
| description: 'Path to the copier answers file' | ||
| type: string | ||
| default: '.copier-answers.yml' | ||
|
|
||
| jobs: | ||
| confirm-on-tagged-copier-template: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 2 | ||
| name: Fail if template under development | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Check _commit is a clean release tag | ||
| run: | | ||
| ANSWERS_FILE="${{ inputs.answers_file }}" | ||
| if [ ! -f "$ANSWERS_FILE" ]; then | ||
| echo "Error: $ANSWERS_FILE not found" | ||
| exit 1 | ||
| fi | ||
| 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 | ||
|
Comment on lines
+29
to
+33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Hyphen check may reject valid semver pre-release tags. The Consider a more precise pattern if pre-release tags should be allowed: # Rejects git-describe format (vX.Y.Z-N-gHASH) but allows semver pre-release (vX.Y.Z-alpha)
if echo "$COMMIT_LINE" | grep -qE '\-[0-9]+-g[0-9a-f]+'; thenIf dev commits are the only concern and pre-release tags are not used upstream, the current implementation is acceptable. 🤖 Prompt for AI Agents |
||
| fi | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,12 +14,12 @@ jobs: | |||||
| permissions: | ||||||
| contents: write | ||||||
| steps: | ||||||
| - uses: actions/checkout@v6.0.1 | ||||||
| - uses: actions/checkout@v6.0.2 | ||||||
| with: | ||||||
| ref: ${{ github.event.pull_request.merge_commit_sha }} | ||||||
| fetch-depth: '0' | ||||||
| persist-credentials: false | ||||||
| - 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 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check the fork's commit history and compare to original
echo "=== Checking fork details ==="
gh repo view nickkostov/github-tag-action --json name,owner,description,updatedAt,forkCount,stargazerCount 2>/dev/null || echo "Could not fetch repo details"
echo ""
echo "=== Checking the specific commit ==="
gh api repos/nickkostov/github-tag-action/commits/b3aa34b4ac9c7843ee609ba5d0b0a50b962647b9 --jq '.commit.message, .commit.author.date' 2>/dev/null || echo "Could not fetch commit details"Repository: LabAutomationAndScreening/copier-nuxt-python-intranet-app Length of output: 340 🌐 Web query:
💡 Result: No evidence found of a GitHub repository nickkostov/github-tag-action. Nikolay Kostov (GitHub username: nickkostov) is a DevOps engineer at Planet (weareplanet) in Sofia, with expertise in GitHub Actions, GitOps, Kubernetes, etc. He has forked many repositories including anothrNick/github-tag-action (a popular Shell-based GitHub Action for automatic SemVer tagging), but does not appear to maintain a Node.js-based fork. The original anothrNick/github-tag-action uses Node.js (upgraded to v20 in 2024; mathieudutour/github-tag-action, a TypeScript/Node.js alternative, upgraded to Node 24 in 2026). No sources indicate active Node.js maintenance by nickkostov for this action. His repos focus on homelab, ArgoCD, etc., not github-tag-action forks. Citations:
🌐 Web query:
💡 Result: The mathieudutour/github-tag-action is compatible with Node.js 20. It was updated from Node 16 (EOL) to Node 20 via PR Citations:
🏁 Script executed: # Check if there's any documentation about dependency choices in the repository
find . -type f \( -name "*.md" -o -name "*.txt" -o -name "DEPENDENCIES" -o -name "ADR*" \) | head -20Repository: LabAutomationAndScreening/copier-nuxt-python-intranet-app Length of output: 655 🏁 Script executed: # Check the workflow file for any additional context
cat -n .github/workflows/tag-on-merge.yamlRepository: LabAutomationAndScreening/copier-nuxt-python-intranet-app Length of output: 1014 🏁 Script executed: # Search for any references to this commit hash in the repository
rg "b3aa34b4ac9c7843ee609ba5d0b0a50b962647b9" .Repository: LabAutomationAndScreening/copier-nuxt-python-intranet-app Length of output: 83 🌐 Web query:
💡 Result: No public GitHub commit matching the SHA "b3aa34b4ac9c7843ee609ba5d0b0a50b962647b9" was found in relation to "github-tag-action" or similar repositories. Extensive searches across GitHub, including anothrNick/github-tag-action (the primary matching action), mathieudutour/github-tag-action fork, releases, tags, pull requests, and general web results returned no matches for this specific commit hash. It may be a private commit, from a deleted repository, or not publicly indexed. Citations:
Remove the unmaintained fork and use the upstream action instead. The fork Use Recommended change- uses: nickkostov/github-tag-action@b3aa34b4ac9c7843ee609ba5d0b0a50b962647b9 # v1.3.0
+ uses: mathieudutour/github-tag-action@v6.2📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| with: | ||||||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,9 @@ | ||||||||||||||||||||||
| {% raw %}{ | ||||||||||||||||||||||
| "hostRequirements": { | ||||||||||||||||||||||
| "cpus": 2, | ||||||||||||||||||||||
| // Static site generation requires more memory | ||||||||||||||||||||||
| "memory": "10gb" | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
|
Comment on lines
+2
to
+6
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Make This template-level hardcode can force larger dev environments than needed and increases drift risk with generated repos (notably where Proposed template refactor- "hostRequirements": {
- "cpus": 2,
- // Static site generation requires more memory
- "memory": "10gb"
- },
+ "hostRequirements": {
+ "cpus": {% endraw %}{{ devcontainer_host_cpus | default(2) }}{% raw %},
+ // Keep configurable to avoid over-provisioning across generated repos
+ "memory": "{% endraw %}{{ devcontainer_host_memory | default('4gb') }}{% raw %}"
+ },📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| "dockerComposeFile": "docker-compose.yml", | ||||||||||||||||||||||
| "service": "devcontainer", | ||||||||||||||||||||||
| "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||||||||||||||||||||||
|
|
@@ -40,28 +45,28 @@ | |||||||||||||||||||||
| "ms-vscode.live-server@0.5.2025051301", | ||||||||||||||||||||||
| "MS-vsliveshare.vsliveshare@1.0.5905", | ||||||||||||||||||||||
| "github.copilot@1.388.0", | ||||||||||||||||||||||
| "github.copilot-chat@0.38.2026022704",{% endraw %}{% if install_claude_cli %}{% raw %} | ||||||||||||||||||||||
| "anthropic.claude-code@2.1.74",{% endraw %}{% endif %}{% raw %} | ||||||||||||||||||||||
| "github.copilot-chat@0.42.2026032602",{% endraw %}{% if install_claude_cli %}{% raw %} | ||||||||||||||||||||||
| "anthropic.claude-code@2.1.84",{% endraw %}{% endif %}{% raw %} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| // Python | ||||||||||||||||||||||
| "ms-python.python@2026.2.2026021801", | ||||||||||||||||||||||
| "ms-python.vscode-pylance@2026.1.1", | ||||||||||||||||||||||
| "ms-python.python@2026.5.2026032701", | ||||||||||||||||||||||
| "ms-python.vscode-pylance@2026.1.102", | ||||||||||||||||||||||
| "ms-vscode-remote.remote-containers@0.414.0", | ||||||||||||||||||||||
| "charliermarsh.ruff@2026.36.0", | ||||||||||||||||||||||
| "charliermarsh.ruff@2026.38.0", | ||||||||||||||||||||||
| {% endraw %}{% if is_child_of_copier_base_template is not defined and template_uses_vuejs is defined and template_uses_vuejs is sameas(true) %}{% raw %} | ||||||||||||||||||||||
| // VueJS | ||||||||||||||||||||||
| "vue.volar@3.2.5", | ||||||||||||||||||||||
| "vitest.explorer@1.36.0", | ||||||||||||||||||||||
| {% endraw %}{% endif %}{% raw %}{% endraw %}{% if is_child_of_copier_base_template is not defined and template_uses_javascript is defined and template_uses_javascript is sameas(true) %}{% raw %} | ||||||||||||||||||||||
| // All javascript | ||||||||||||||||||||||
| "dbaeumer.vscode-eslint@3.0.21", | ||||||||||||||||||||||
| "dbaeumer.vscode-eslint@3.0.24", | ||||||||||||||||||||||
| {% endraw %}{% endif %}{% raw %} | ||||||||||||||||||||||
| // Misc file formats | ||||||||||||||||||||||
| "bierner.markdown-mermaid@1.29.0", | ||||||||||||||||||||||
| "samuelcolvin.jinjahtml@0.20.0", | ||||||||||||||||||||||
| "tamasfe.even-better-toml@0.19.2", | ||||||||||||||||||||||
| "emilast.LogFileHighlighter@3.3.3", | ||||||||||||||||||||||
| "esbenp.prettier-vscode@12.3.0" | ||||||||||||||||||||||
| "esbenp.prettier-vscode@12.4.0" | ||||||||||||||||||||||
| ], | ||||||||||||||||||||||
| "settings": { | ||||||||||||||||||||||
| "editor.accessibilitySupport": "off", // turn off sounds | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statuses_urlis undefined formerge_groupevents.Same issue as in the template: line 234 includes
merge_groupin the condition, butgithub.event.pull_request.statuses_url(line 240) is only available forpull_requestevents. The API call will fail formerge_groupevents.🛠️ Proposed fix: Limit to pull_request only
🤖 Prompt for AI Agents