Skip to content

feat(gittag): Add git url param to gittag plugin#2848

Merged
olblak merged 8 commits intoupdatecli:mainfrom
olblak:feat/gittag
Oct 25, 2024
Merged

feat(gittag): Add git url param to gittag plugin#2848
olblak merged 8 commits intoupdatecli:mainfrom
olblak:feat/gittag

Conversation

@olblak
Copy link
Copy Markdown
Member

@olblak olblak commented Oct 19, 2024

This pull request allows using the gittag plugin with a URL without having to specify a scmid
Using the scmid comes with the requirement that we need to know what branch the git repository use (master vs main) as Updatecli run git checkout operation before handling a resource, but in the context of the gittag all we need is running git clone to retrieve the tag locally.

The gittag plugin can now be used in three different ways

  1. using the scmid to clone the repository
  2. using the path parameter to analyze an already cloned git repository
  3. using the url parameter to clone and then analyze the repository, which is more convenient for autodiscovery plugin like feat: add GitHub action autodiscovery plugin #1964

Test

To test this pull request, you can run the following commands:

cd <to_package_directory>
go test

Additional Information

Tradeoff

Potential improvement

I am considering deprecating the parameter path in favor of directory to align with scm naming

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added enhancement New feature or request resource-gittag Resource of kind Git Tag labels Oct 19, 2024
@olblak olblak added this to the 0.86.0 milestone Oct 19, 2024
@olblak olblak changed the title feat: Add git url param to gittag plugin feat(gittag): Add git url param to gittag plugin Oct 19, 2024
@olblak olblak marked this pull request as draft October 19, 2024 19:38
@olblak olblak marked this pull request as ready for review October 25, 2024 08:05
Signed-off-by: Olblak <me@olblak.com>
* Allow to use gittag target with sourceinput disable
* Fix password for gittag target using URL
* Don't apply versionfilter on an empty tag list
* Ensure we provide a git tag name to create

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak enabled auto-merge (squash) October 25, 2024 09:43
@olblak olblak merged commit 3733561 into updatecli:main Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request resource-gittag Resource of kind Git Tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant