pipelines-as-code
pipelines-as-code copied to clipboard
Update gitlab-webhook command
Changes
- Update gitlab-webhook command to show default Repository info
- Added check to not ask
Please enter your GitLab API URL::
forhttps://gitlab.com
to make behavior similar to GitHub and Bitbucket - Modified message
Please enter your GitLab API URL::
->Please enter your GitLab enterprise API URL::
Changes:
Before:
$ tkn pac setup gitlab-webhook
? Please enter the project ID for the repository you want to be configured,
project ID refers to an unique ID shown at the top of your GitLab project : 17103
? Please enter your controller public route URL: https://smee.io/kIVoOfQotuoc1Ca
ℹ ️You now need to create a GitLab personal access token with `api` scope
ℹ ️Go to this URL to generate one https://gitlab.com/-/profile/personal_access_tokens, see https://is.gd/rOEo9B for documentation
? Please enter the GitLab access token: **************************
? Please enter your GitLab API URL:: https://gitlab.com/
✓ Webhook has been created on your repository
...
After:
$ ./tkn-pac setup gitlab-webhook
✓ Setting up GitLab Webhook for Repository https://gitlab.com/savitaashture/gitlabpushtestpac
? Please enter the project ID for the repository you want to be configured,
project ID refers to an unique ID shown at the top of your GitLab project : 17103
? Please enter your controller public route URL: https://smee.io/kIVoOfQotuoc1Ca
ℹ ️You now need to create a GitLab personal access token with `api` scope
ℹ ️Go to this URL to generate one https://gitlab.com/-/profile/personal_access_tokens, see https://is.gd/rOEo9B for documentation
? Please enter the GitLab access token: **************************
✓ Webhook has been created on your repository
...
Submitter Checklist
- [ ] ♽ Run
make test lint
before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI - [ ] 📖 If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
- [ ] 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
- [ ] 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
- [ ] 🔎 If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).
Codecov Report
Merging #801 (8d9af8f) into main (08c19cf) will decrease coverage by
0.30%
. The diff coverage is54.54%
.
:exclamation: Current head 8d9af8f differs from pull request most recent head 67de5e3. Consider uploading reports for the commit 67de5e3 to get more accurate results
@@ Coverage Diff @@
## main #801 +/- ##
==========================================
- Coverage 66.10% 65.79% -0.31%
==========================================
Files 75 75
Lines 4540 4587 +47
==========================================
+ Hits 3001 3018 +17
- Misses 1250 1281 +31
+ Partials 289 288 -1
Impacted Files | Coverage Δ | |
---|---|---|
pkg/cli/webhook/gitlab.go | 51.11% <54.54%> (-1.91%) |
:arrow_down: |
pkg/reconciler/status.go | 72.91% <0.00%> (-1.60%) |
:arrow_down: |
pkg/provider/gitlab/gitlab.go | 79.76% <0.00%> (-1.00%) |
:arrow_down: |
pkg/templates/templating.go | 100.00% <0.00%> (ø) |
|
pkg/cmd/tknpac/create/repository.go | 37.03% <0.00%> (+3.70%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
I think this should be called hosted gitlab instead of enterprise and I don't think we can assume gitlab.com
I think this should be called hosted gitlab instead of enterprise and I don't think we can assume gitlab.com
Oh do we have any other defaults for gitlab ?
@savitaashture i don't think we do, generally the gitlab experience needs to be sane for hosted environement more than public, i believe that's how most of our users/customers would use it.
@savitaashture i don't think we do, generally the gitlab experience needs to be sane for hosted environement more than public, i believe that's how most of our users/customers would use it.
Oh okok In that case i will revert back those changes