stalecontext/forgejo-cli-plus
2
4
Fork
You've already forked forgejo-cli-plus
1

Add --label flag to issue create and pr create #36

Open
opened 2026年03月30日 22:06:38 +02:00 by stalecontext · 0 comments

Feature Request

Add a --label flag to fj issue create and fj pr create so labels can be assigned at creation time instead of requiring a separate fj issue edit <id> labels --add step afterward.

Current workflow (two steps)

fj issue create "My issue" --body "description"
# ok: Created issue #42
fj issue edit 42 labels --add "bug" --add "enhancement"

Proposed workflow (one step)

fj issue create "My issue" --body "description" --label bug --label enhancement
fj pr create --title "Fix thing" --label bug --label fix

API support

The Forgejo API already supports this. The CreateIssueOption struct accepts a labels field (array of label IDs), and CreatePullRequestOption accepts labels as well.

Implementation notes

Since the API takes label IDs (not names), the CLI will need to resolve label names to IDs before creating the issue/PR, similar to how milestone names are resolved.

## Feature Request Add a `--label` flag to `fj issue create` and `fj pr create` so labels can be assigned at creation time instead of requiring a separate `fj issue edit <id> labels --add` step afterward. ### Current workflow (two steps) ```sh fj issue create "My issue" --body "description" # ok: Created issue #42 fj issue edit 42 labels --add "bug" --add "enhancement" ``` ### Proposed workflow (one step) ```sh fj issue create "My issue" --body "description" --label bug --label enhancement fj pr create --title "Fix thing" --label bug --label fix ``` ### API support The Forgejo API already supports this. The `CreateIssueOption` struct accepts a `labels` field (array of label IDs), and `CreatePullRequestOption` accepts `labels` as well. ### Related upstream work - [forgejo-contrib/forgejo-cli#334](https://codeberg.org/forgejo-contrib/forgejo-cli/pulls/334) - Merged PR that added `repo label` commands and `issue edit labels`, but did not add `--label` to create commands - [forgejo-contrib/forgejo-cli#311](https://codeberg.org/forgejo-contrib/forgejo-cli/pulls/311) - Earlier closed (not merged) PR for label management, also did not cover create-time labels - [forgejo-contrib/forgejo-cli#280](https://codeberg.org/forgejo-contrib/forgejo-cli/issues/280) - Original issue requesting label support (closed after #334 merged) ### Implementation notes Since the API takes label IDs (not names), the CLI will need to resolve label names to IDs before creating the issue/PR, similar to how milestone names are resolved.
Sign in to join this conversation.
No Branch/Tag specified
main
feature/issue-batch-2026-07
upstream-sync/2026-07-02
feat/repo-create-org
projects
v2.0.0
upstream-reviewed/2026-07-02
v1.1.0
upstream-reviewed/2026-03-31
v1.0.0
upstream-reviewed/2026-03-16
v0.4.0
v0.3.0
v0.2.0
v0.1.1
v0.1.0
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
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
stalecontext/forgejo-cli-plus#36
Reference in a new issue
stalecontext/forgejo-cli-plus
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?