10
310
Fork
You've already forked codeberg-cli
33

Impossible to create an issue non-interactively #162

Closed
opened 2025年01月09日 09:46:38 +01:00 by nicoco · 3 comments

I did not find how to create an issue non-interactively.

Attempt #1:

> berg --non-interactive issue create --title "test" --description "test description"
? Choose optional properties 
> [ ] Labels
 [ ] Assignees
 [ ] Milestone
[↑↓ to move, space to select one, → to all, ← to none, type to filter]

Attempt #2:

> berg --non-interactive issue create --title "test" --description "test description" --labels "" --assignees "" --milestone ""
┌─────────────────────────────────────────────────────────────────────────┐
│ There's nothing to select from │
│ │
│ Caused by: │
│ The prompt configuration is invalid: Available options can not be empty │
└─────────────────────────────────────────────────────────────────────────┘

For context, I am writing a script to migrate some projects from sourcehut, and using codeberg-cli looks like a good option.

I did not find how to create an issue non-interactively. Attempt #1: ```shell > berg --non-interactive issue create --title "test" --description "test description" ? Choose optional properties > [ ] Labels [ ] Assignees [ ] Milestone [↑↓ to move, space to select one, → to all, ← to none, type to filter] ``` Attempt #2: ```shell > berg --non-interactive issue create --title "test" --description "test description" --labels "" --assignees "" --milestone "" ┌─────────────────────────────────────────────────────────────────────────┐ │ There's nothing to select from │ │ │ │ Caused by: │ │ The prompt configuration is invalid: Available options can not be empty │ └─────────────────────────────────────────────────────────────────────────┘ ``` For context, I am writing a script to migrate some projects from [sourcehut](https://sr.ht), and using `codeberg-cli` looks like a good option.
Owner
Copy link

Yeah it could be the case that most of the subcommands don't support non-interactive as of now since there wasn't really a use case for that yet. It should be easy to implement though. Could you please give me a list of commands you are going to need for your migration script here so I can make sure they all work?

Yeah it could be the case that most of the subcommands don't support `non-interactive` as of now since there wasn't really a use case for that yet. It should be easy to implement though. Could you please give me a list of commands you are going to need for your migration script here so I can make sure they all work?
Author
Copy link

Hey thanks for considering the request!

For my script I finally opted for python using clientapi_forgejo which is more feature complete, so I won't use berg for it anyway... But fixing the non-interactive usage would be great anyway. ;)

Hey thanks for considering the request! For my script I finally opted for python using [clientapi_forgejo](https://github.com/client-api/forgejo-python) which is more feature complete, so I won't use berg for it anyway... But fixing the non-interactive usage would be great anyway. ;)
Owner
Copy link

This is fixed now as well as some other commands. Non-interactiveness support is growing :) I'm closing this here since the specific issue was resolved. Thanks for taking the time to create this issue 💚

This is fixed now as well as some other commands. Non-interactiveness support is growing :) I'm closing this here since the specific issue was resolved. Thanks for taking the time to create this issue 💚
Sign in to join this conversation.
No Branch/Tag specified
main
v0.5.1
v0.5.0
v0.4.11
v0.4.10
v0.4.9
v0.4.8
v0.4.7
v0.4.6
v0.4.5
v0.4.4
v0.4.3
v0.4.1
v0.4.2
v0.4.0
v0.3.5
v0.3.4
v0.3.2
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.1
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Aviac/codeberg-cli#162
Reference in a new issue
Aviac/codeberg-cli
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?