Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

Conversation

@tschm
Copy link
Member

@tschm tschm commented Dec 17, 2025

Updated action.yml to improve clarity and functionality, including changes to input descriptions, branch defaults, and steps for syncing templates.

Updated action.yml to improve clarity and functionality, including changes to input descriptions, branch defaults, and steps for syncing templates.
Refactor test-action.sh script for improved clarity and structure, including changes to variable names, comments, and echo statements.
Add check and installation for uv/uvx in test script
@tschm tschm requested a review from Copilot December 17, 2025 13:11
@tschm
Copy link
Member Author

tschm commented Dec 17, 2025

@copilot Help to fix the broken test

Copy link
Contributor

Copilot AI commented Dec 17, 2025

@tschm I've opened a new pull request, #17, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Copy link

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

This pull request refactors the template synchronization action from a manual git-based implementation to use the rhiza tool, significantly simplifying the codebase while introducing several breaking changes to the API.

Key Changes:

  • Replaced manual git sparse checkout logic with uvx rhiza validate and uvx rhiza materialize commands
  • Removed several inputs: automerge, test-mode, and template-ref, replacing them with a single create-pr boolean input
  • Changed the default branch name from sync/update to sync/template-update

Reviewed changes

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

File Description
action.yml Complete refactoring to use rhiza tool; removed configuration parsing logic, sparse checkout steps, and automerge functionality; simplified to 3 main steps (checkout, validate, sync+commit)
tests/test-action.sh Rewrote test script to mirror the new rhiza-based workflow; removed automerge and YAML parsing tests; added direct rhiza command testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +24 to +27
create-pr:
description: Whether to create a pull request if changes are detected
required: false
default: "true"
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The 'template-ref' input has been removed. This prevents users from specifying a specific tag or branch to check out from the template repository, limiting flexibility in template version control.

Copilot uses AI. Check for mistakes.
fetch-depth: 0
sparse-checkout: ${{ steps.config.outputs.include }}
sparse-checkout-cone-mode: false
version: "0.9.17"
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The hardcoded version "0.9.17" for the uv tool should ideally be configurable or use a more flexible version constraint (e.g., "latest" or a version range). This makes it easier to keep dependencies up to date without requiring action updates.

Copilot uses AI. Check for mistakes.
Comment on lines +94 to 95
git push origin "HEAD:${{ inputs.branch }}" --force-with-lease
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The action now always performs a git push even when create-pr is false. If a user sets create-pr to false but still wants to sync locally without pushing, they have no option. Consider making the push conditional based on whether create-pr is true, or adding a separate input to control pushing.

Suggested change
git push origin "HEAD:${{ inputs.branch }}" --force-with-lease
if [ "${{ inputs.create-pr }}" = "true" ]; then
git push origin "HEAD:${{ inputs.branch }}" --force-with-lease
fi

Copilot uses AI. Check for mistakes.
commit-message: ${{ inputs.commit-message }}
delete-branch: false
title: "chore: sync template from ${{ steps.config.outputs.template_repository }}@${{ steps.config.outputs.template_ref || steps.config.outputs.template_branch }}"
title: ${{ inputs.commit-message }}
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The commit-message input is being used as the PR title. This may not be ideal as commit messages and PR titles often have different conventions and purposes. Consider using a separate input for the PR title or constructing a more descriptive title.

Copilot uses AI. Check for mistakes.
if git diff --cached --name-only | grep -q '^\.github/workflows/'; then
echo "⚠️ Workflow files modified — PAT with workflow scope required."
echo "⚠️ Workflow files modified — PAT with workflow scope may be required."
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The error message change from "PAT with workflow scope required" to "PAT with workflow scope may be required" is less definitive. If workflow files are being modified, the PAT definitely requires workflow scope, not just "may" require it. Consider reverting to the more accurate original message.

Suggested change
echo "⚠️ Workflow files modified — PAT with workflow scope may be required."
echo "⚠️ Workflow files modified — PAT with workflow scope required."

Copilot uses AI. Check for mistakes.
default: 'sync/update'
description: Target branch for the sync
required: false
default: sync/template-update
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The default branch name has been changed from 'sync/update' to 'sync/template-update'. This is a breaking change that could affect existing workflows or automation that depend on the previous default branch name.

Suggested change
default: sync/template-update
default: sync/update

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +27
create-pr:
description: Whether to create a pull request if changes are detected
required: false
default: "true"
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The 'automerge' input has been removed without providing an alternative mechanism or migration path. Users who were relying on the automerge feature will lose this functionality.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +27
create-pr:
description: Whether to create a pull request if changes are detected
required: false
default: "true"
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The 'test-mode' input has been removed. This makes it harder to test the action without creating actual commits and pushes, which could complicate local testing and CI workflows.

Copilot uses AI. Check for mistakes.
Copilot AI and others added 2 commits December 17, 2025 13:35
…efault

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Simplify action.yml to use rhiza's default .github/template.yml convention
@tschm
Copy link
Member Author

tschm commented Dec 17, 2025

@copilot: please help with the broken test

Copy link
Contributor

Copilot AI commented Dec 17, 2025

@tschm I've opened a new pull request, #18, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits December 17, 2025 13:55
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Fix test script to use file:// protocol for local Git repository
@tschm
Copy link
Member Author

tschm commented Dec 17, 2025

@copilot: Still tests file, see 2025-12-17 14:07:20.724 | INFO | rhiza.commands.materialize:materialize:72 - Include paths:
2025-12-17 14:07:20.724 | INFO | rhiza.commands.materialize:materialize:74 - - CODE_OF_CONDUCT.md
2025-12-17 14:07:20.724 | INFO | rhiza.commands.materialize:materialize:74 - - CONTRIBUTING.md
2025-12-17 14:07:20.724 | INFO | rhiza.commands.materialize:materialize:74 - - .github/
2025-12-17 14:07:20.724 | INFO | rhiza.commands.materialize:materialize:80 - Cloning file:///tmp/tmp.LFdUA0MCuc/template@main into temporary directory
Cloning into '/tmp/tmpch11a9j1'...
remote: Not Found
fatal: repository 'https://github.com/file:///tmp/tmp.LFdUA0MCuc/template.git/' not found

Copy link
Contributor

Copilot AI commented Dec 17, 2025

@tschm I've opened a new pull request, #19, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits December 17, 2025 18:18
* Initial plan

* Simplify test to use real GitHub repository (jebel-quant/rhiza)

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Comment out the cloning of the jebel-quant/rhiza repository and related commands.
@tschm tschm merged commit 5049ebc into main Dec 17, 2025
1 check passed
@tschm tschm deleted the rhiza branch December 17, 2025 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants