Fix results command to auto-detect git parameters from local repository #173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves the usability of the kci-dev results command by automatically detecting missing git parameters (URL, branch, commit) from the local git repository.
Previously, when using --giturl without specifying --branch, the command would fall back to using the default repository settings, often resulting in incorrect tree URLs being displayed and API errors. This made it cumbersome to check results for specific commits while working on a development branch.
The changes refactor set_giturl_branch_commit() to intelligently fill in any missing parameters from the local git repository:
This is particularly useful when working on a development branch and wanting to check results for specific commits. For example:
Check results for a specific commit on your current branch
kci-dev results summary --commit abc123def
Use a different git URL but keep your current branch context (because, for example, my local git might point to a gitolite variant)
kci-dev results summary --giturl https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linus-next.git --commit abc123def