| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: ihopenre-eng <247072151+ihopenre-eng@users.noreply.github.com>
|
Thanks for the pullrequest, I'll try to find some time in the coming days to review it |
Sorry, something went wrong.
|
I just gave a quick test and it works as expected thanks for the e2e tests. |
Sorry, something went wrong.
|
Tick the box to add this pull request to the merge queue (same as @mergifyio queue).
|
Sorry, something went wrong.
The condition checks that a commit exists in the repository. The commit hash defaults to the source output and can be overridden with spec.hash. Repository selection follows the same order as the source: URL, path, then SCM working directory. Abbreviated hashes are resolved with the Git revision syntax. Signed-off-by: ihopenre-eng <247072151+ihopenre-eng@users.noreply.github.com>
|
Thanks for testing it! I went ahead and added the condition in this PR (9b60f1d). The condition checks that a commit exists in the repository: the commit hash defaults to the source output and can be overridden with spec.hash (abbreviated hashes are supported). Repository selection follows the same order as the source: spec.url, then spec.path, then the scmid working directory. The e2e manifest now covers two condition scenarios — checking the source commit against the SCM working directory, and checking a pinned hash against a cloned URL — and the website documentation PR (updatecli/website#3563) is updated accordingly. go test ./pkg/plugins/resources/gitcommit -count=1 go test ./pkg/plugins/utils/gitgeneric -run '^TestIsCommitExist$' -count=1 go run . diff --config e2e/updatecli.d/success.d/gitCommit.yaml |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the pull request
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fix #2052
Add a gitcommit resource. The source returns the latest commit hash for a Git branch; the condition checks that a commit exists in a repository. Both support repository URLs, local paths, and SCM working directories. Branch lookup resolves local and origin refs without checking out the branch or modifying the working tree.
The condition hash defaults to the source output and can be overridden with spec.hash; abbreviated hashes are resolved with the Git revision syntax.
The resource is registered in the pipeline mapping and includes an end-to-end manifest covering URL, path, and SCM inputs plus two condition scenarios.
Test
Additional Information
Checklist
Tradeoff
The target stage returns an explicit unsupported error because a commit hash is immutable. The condition checks commit existence, defaulting to the source output with spec.hash as an override.
Potential improvement
A future changelog implementation could expose commits between two source revisions.