feat: Add golang autodiscovery policy support for Gitea/Gitlab/Stash/Bitbucket#49
Conversation
|
One nit: It'd be nice to have a |
777a271 to
1b4b124
Compare
1b4b124 to
676512d
Compare
|
@AmandaCameron Could you have another look? It should be good. |
There was a problem hiding this comment.
Pull Request Overview
Adds proof-of-concept support for auto-discovery policies against multiple SCM platforms in Go (Gitea, GitLab, Stash, Bitbucket).
- Extend
values.yamlwithscm.kind,env_token, and optionalcommitusingapisettings. - Simplify default template, pin version
v0.103.0, and split SCM-specific logic into separate_scm.*.yamlfiles. - Bump policy version to
0.10.0and update the changelog.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| updatecli/policies/golang/autodiscovery/values.yaml | Introduce scm.kind, env_token, and document commit option |
| updatecli/policies/golang/autodiscovery/updatecli.d/default.tpl | Pin template version and simplify SCM condition |
| updatecli/policies/golang/autodiscovery/updatecli.d/_scm.stash.yaml | Add Stash SCM template |
| updatecli/policies/golang/autodiscovery/updatecli.d/_scm.gitlab.yaml | Add GitLab SCM template |
| updatecli/policies/golang/autodiscovery/updatecli.d/_scm.github.yaml | Add GitHub SCM template |
| updatecli/policies/golang/autodiscovery/updatecli.d/_scm.gitea.yaml | Add Gitea SCM template |
| updatecli/policies/golang/autodiscovery/updatecli.d/_scm.bitbucket.yaml | Add Bitbucket SCM template |
| updatecli/policies/golang/autodiscovery/Policy.yaml | Bump policy version from 0.9.0 to 0.10.0 |
| updatecli/policies/golang/autodiscovery/CHANGELOG.md | Add 0.10.0 changelog entry |
Comments suppressed due to low confidence (2)
updatecli/policies/golang/autodiscovery/values.yaml:10
- Update the comment to list all supported SCM kinds (github, gitea, gitlab, stash, bitbucket) to keep documentation in sync with the new templates.
# Accepted values: github, gitea
updatecli/policies/golang/autodiscovery/updatecli.d/_scm.bitbucket.yaml:2
- The variable name
$GitbucketPATis inconsistent with other SCM templates ($BitbucketPAT). Renaming it to match the pattern would improve consistency.
# {{ $GitbucketPAT := env .scm.env_token }}
updatecli/policies/golang/autodiscovery/updatecli.d/_scm.bitbucket.yaml
Outdated
Show resolved
Hide resolved
|
Sorry for delay getting back, currently on vacation so I've spent a lot of time away from my laptop. Looks good, the other policies I'd probably be using short-term is forgejo/github actions autodiscovery, as well as updatecli policy updates. |
This pullrequest is not designed to be merged but as a proof of concept to use the partial feature suggested from
updatecli/updatecli#5508
Description
Test
To test this pull request, you need a custom Updatecli build
based on updatecli/updatecli#5508
Then you can run the following commands:
Additional Information
Tradeoff
Potential improvement