Skip to content

Fix helm-docs step failing when there are no changes#24

Merged
mitchnielsen merged 1 commit intomainfrom
fix-no-helm-docs-changes
Oct 21, 2025
Merged

Fix helm-docs step failing when there are no changes#24
mitchnielsen merged 1 commit intomainfrom
fix-no-helm-docs-changes

Conversation

@mitchnielsen
Copy link
Copy Markdown
Member

The helm-docs step was failing with exit code 1 when there were no documentation changes to commit. This occurred because the shell's set -e flag (from the default bash configuration) causes immediate exit on any non-zero exit code, and git commit returns 1 when there's nothing to commit.

This fix adds a check for actual file changes before attempting to commit and push. If helm-docs doesn't generate any changes, the step now completes successfully without trying to commit.

Related: https://github.com/PrefectHQ/prefect-operator/actions/runs/18656329028/job/53186252489

The helm-docs step was failing with exit code 1 when there were no documentation changes to commit. This occurred because the shell's `set -e` flag (from the default bash configuration) causes immediate exit on any non-zero exit code, and `git commit` returns 1 when there's nothing to commit.

This fix adds a check for actual file changes before attempting to commit and push. If helm-docs doesn't generate any changes, the step now completes successfully without trying to commit.

Related: https://github.com/PrefectHQ/prefect-operator/actions/runs/18656329028/job/53186252489

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mitchnielsen mitchnielsen self-assigned this Oct 20, 2025
@mitchnielsen mitchnielsen added the bug Something isn't working label Oct 20, 2025
@mitchnielsen mitchnielsen marked this pull request as ready for review October 20, 2025 15:23
@mitchnielsen mitchnielsen requested a review from a team October 20, 2025 19:18
@mitchnielsen mitchnielsen merged commit f14d473 into main Oct 21, 2025
1 check passed
@mitchnielsen mitchnielsen deleted the fix-no-helm-docs-changes branch October 21, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants