Skip to content

Conversation

@sashalevin
Copy link

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:

  • If --giturl is provided but --branch is missing, it uses the current branch from the local repo
  • If --commit is missing (and --latest isn't specified), it uses the current HEAD commit
  • If --giturl is missing, it uses the origin URL from the local repo

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

Sasha Levin added 2 commits June 9, 2025 21:45
The results summary command was not displaying the provided git URL when
using the --giturl parameter. Instead, it would show the default
torvalds/linux.git URL. This fix ensures the correct URL is displayed
along with branch and commit information when explicitly provided.

Signed-off-by: Sasha Levin <sashal@kernel.org>
…tory

Refactored set_giturl_branch_commit to automatically fill in any missing
parameters (giturl, branch, or commit) from the local git repository.
This provides a more flexible and user-friendly interface where users
can omit parameters and have them intelligently defaulted from their
local git context.

Signed-off-by: Sasha Levin <sashal@kernel.org>
@aliceinwire
Copy link
Member

thanks!

@aliceinwire aliceinwire merged commit ae601e1 into kernelci:main Jun 11, 2025
5 checks passed
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.

2 participants