Closed haxung closed 11 months ago
How I can add repo via woodpecker-cli
by repo id, just like this:
woodpecker repo add 48444
But this is so terrible and ugly. Have any effective ways to sync repos?
Most of these aren't bugs, but incorrect usage (or enhancement requests). Please read the docs before opening issues.
woodpecker repo list
is not a valid command. Use woodpecker repo ls
.woodpecker repo info
must be used together with a repo name/idI cannot see any repos in /repos.
There has been some bugfixes for this recently. Can you retry with the latest version?
But this is so terrible and ugly. Have any effective ways to sync repos?
When listing all repos, this ID is displayed (forgeRemoteID
).
You are right that I should use woodpecker repo ls
.
However, when run woodpecker repo sync | wc -l
, I can see 133 repos(In fact, there are many repos like groupA/subgroupB/projectC
not in list).
If I add those repos in web UI, I must run woodpecker repo add <forgeRemoteID>
133 times or run a shell script, that is unreasonable. Would add a button sync repo
in web UI or run woodpecker repo sync
, then repos will show on web UI?
Here is woodpecker version:
And when I upgrade image version:
I run woodpecker repo sync | wc -l
again, here is the result:
I lost more repos info.
Looks like only show those repos that I have owner
or maintainer
permission.
Let me explain these commands:
repo sync
: this fetches all repos from forge and shows them. This includes enabled and non-enabled repos.repo ls
: this only shows enabled repos.repo add
: this enables a repository.Looks like only show those repos that I have owner or maintainer permission.
That's expected. repo sync
should be used if you want to enable a new repo and you can only enable repos if you can create webhooks for it in forge which requires admin permissions.
Actually, repo sync
is just the same what you can see when clicking the "Add repository" button in web ui. Clicking the "enable" button in this list is the same as repo add
.
It's strange that when I click "Add repository" before, there are nothing show on web UI. Now it's ok, and I can see enable
button in each repo box(maybe 133 repos are too many to show them). Thank u for your help. The latest question: Have any plans to support repo like groupA/subgroupB/projectC
?
The latest question: Have any plans to support repo like groupA/subgroupB/projectC?
We did a lot of preparation work in this direction, but I actually thought these should work now. @anbraten I think the corresponding issue was closed when the repo-id PR was merged. Was this verified to work?
Component
cli, web-ui
Describe the bug
GitLab server version: 14.3.4 woodpecker server version: 1.0.4 woodpecker-cli version: 1.0.4
I cannot see any repos in
/repos
. So I download woodpecker-cli, here is the result:Here is the repos (But I cannot see repos like
a/b/c
, justa/b
, this is just first bug).I don't know why I cannot see any repos.
Looks like error happened at
strconv.ParseInt()
function.System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]