Skip to content

fix: harden action publication workflow#15

Merged
kantorcodes merged 1 commit intomainfrom
feat/action-marketplace-polish
Mar 30, 2026
Merged

fix: harden action publication workflow#15
kantorcodes merged 1 commit intomainfrom
feat/action-marketplace-polish

Conversation

@kantorcodes
Copy link
Copy Markdown
Member

Summary

  • make create_repository=false work correctly on workflow dispatch
  • link manual action-repo publishes back to the correct source ref instead of an unrelated release tag
  • extend regression coverage for both cases

Verification

  • .venv/bin/python -m pytest tests/test_action_bundle.py -q
  • .venv/bin/python -m pytest -q
  • yq . .github/workflows/publish-action-repo.yml >/dev/null

Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Mar 30, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .github/workflows/publish-action-repo.yml - 0 issues
  • tests/test_action_bundle.py - 0 issues

Reviewed by mimo-v2-pro-20260318 · 85,703 tokens

@kantorcodes kantorcodes merged commit cf6002e into main Mar 30, 2026
18 checks passed
@kantorcodes kantorcodes deleted the feat/action-marketplace-polish branch March 30, 2026 16:58
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the test suite for action repository workflow synchronization by adding assertions for repository creation logic and source reference metadata. The review feedback recommends using regular expressions for more robust string matching and removing a redundant assertion to improve test maintainability.

assert "hashgraph-online/hol-codex-plugin-scanner-action" in workflow_text
assert "Validate publication credentials" in workflow_text
assert 'if: secrets.ACTION_REPO_TOKEN != \'\'' not in workflow_text
assert "inputs.create_repository && 'true' || 'false'" in workflow_text
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This assertion, which checks for an exact string, is a bit brittle. It could fail if there are minor, semantically-irrelevant formatting changes in the workflow file (e.g., extra spaces). Consider using a regular expression to make the check more robust against such changes. For example:

import re
# ...
assert re.search(r"inputs\.create_repository\s*&&\s*'true'\s*\|\|\s*'false'", workflow_text)

assert "Validate publication credentials" in workflow_text
assert 'if: secrets.ACTION_REPO_TOKEN != \'\'' not in workflow_text
assert "inputs.create_repository && 'true' || 'false'" in workflow_text
assert "SOURCE_REF" in workflow_text
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This assertion is redundant because the assertion on line 45 already verifies the presence and usage of SOURCE_REF. Relying on the more specific assertion on line 45 is sufficient and makes the test cleaner and easier to maintain.

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