Commit Graph

35 Commits

Author SHA1 Message Date
Awiteb
5151f5d04d chore: typo in the license description
Signed-off-by: Awiteb <a@4rs.nl>
2025-09-29 08:28:01 +00:00
Awiteb
f73245f9c3 chore: improve querying
Signed-off-by: Awiteb <a@4rs.nl>
2025-09-13 09:18:55 +00:00
Awiteb
4bcf104c80 docs: update commands titles and descriptions
Signed-off-by: Awiteb <a@4rs.nl>
2025-09-12 10:12:58 +00:00
Awiteb
4360aa192c feat: support pull requests
Support for pull requests, it's not standard in NIPs yet[1] but there must be
two clients that support it to be included in NIPs, n34 is one of them.

This support:
- Create a new PR `n34 pr new`
- Update PR tip `n34 pr update`
- View a PR `n34 pr view`
- List PRs `n34 pr list`
- Add `PR` and `PR-update` kinds as roots in `NostrClient::find_root`
- Support issuing statuses for PRs
- Support GRASP PR and PR-update
- Update the docs

[1] https://github.com/nostr-protocol/nips/pull/1966
2025-09-12 06:43:23 +00:00
Awiteb
518e573467 chore: Move issue-view run block to common_commands::view_pr_issue
Signed-off-by: Awiteb <a@4rs.nl>
2025-08-25 14:51:58 +00:00
Awiteb
1e9e00a4f3 chore: Rename GitIssueUtils trait to GitIssuePrMetadata
Signed-off-by: Awiteb <a@4rs.nl>
2025-08-25 12:12:11 +00:00
Awiteb
c308dc1b42 docs: Update commands help messages
Signed-off-by: Awiteb <a@4rs.nl>
2025-08-24 10:06:55 +00:00
Awiteb
ed1bfaf161 fix(issue)!: make subject mandatory and optional content
BREAKING CHANGE: When the editor contains only one line, it is now
treated as the subject instead of being used as the issue content.

Signed-off-by: Awiteb <a@4rs.nl>
2025-08-18 13:35:18 +00:00
Awiteb
9c55bf8af1 chore: use the existing signer to get the pubkey instead of a new one
Signed-off-by: Awiteb <a@4rs.nl>
2025-08-07 23:22:40 +00:00
Awiteb
e17e75e53b refactor: Move the trait extensions to traits.rs
Signed-off-by: Awiteb <a@4rs.nl>
2025-08-03 15:24:04 +00:00
Awiteb
78113c7402 docs: Fix status command docs
Signed-off-by: Awiteb <a@4rs.nl>
2025-08-02 09:14:21 +00:00
Awiteb
05b4ae30f7 feat: New issue list commands to list the repo issues
Signed-off-by: Awiteb <a@4rs.nl>
2025-07-02 22:07:03 +00:00
Awiteb
9e1e5d7c42 chore: Inline small functions
Signed-off-by: Awiteb <a@4rs.nl>
2025-07-01 15:20:30 +00:00
Awiteb
7e479f3c7a chore: issues utils
Signed-off-by: Awiteb <a@4rs.nl>
2025-07-01 15:07:04 +00:00
Awiteb
035e22a6ba chore: Fix typos
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-28 10:29:38 +00:00
Awiteb
54cae48123 chroe: Check if the naddrs exists for issue new and patch send
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-14 10:46:55 +00:00
Awiteb
ec08a1febc chore: Improve maintainers handling
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-14 10:36:01 +00:00
Awiteb
a9a2cb2b16 feat: New issue {reopen,close,resolve} commands to manage issue status
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-14 09:38:00 +00:00
Awiteb
2a3e2e09c0 chore: Improve single letter tags
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-10 08:53:22 +00:00
Awiteb
da96985a40 feat: New issue view command to view an issue
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-09 22:09:55 +00:00
Awiteb
b1027b3b04 refactor: Improve commands running and make the signer optional for some commands
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-08 20:35:49 +00:00
Awiteb
51bd239024 feat: New config pow command to set the default PoW difficulty
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-07 19:54:40 +00:00
Awiteb
a6a61aedf1 refactor: Store the config in CliOptions instead of its path
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-07 19:00:29 +00:00
Awiteb
494cced9cb feat: Add alt tag to the git issue
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-04 22:05:21 +00:00
Awiteb
01f5fa60e6 chore(issue-new): Add naddrs relays to write relays
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-04 06:56:18 +00:00
Awiteb
7d9b968f16 chore(cli): Add author read relays to discovery relays
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-03 14:28:04 +00:00
Awiteb
4c6578ccb1 feat: Support relays and naddrs sets
This commit introduces support for 'sets', a feature that simplifies
referencing multiple relays or naddrs with a single word.

Sets are stored in the config directory under `n34` as `config.toml` in
`TOML` format. The config path follows the `$XDG_CONFIG_HOME` standard,
defaulting to `$HOME/.config` if unset.

The `n34 sets` command allows managing sets, adding, removing, updating,
or displaying them. When using the main `--relays` flag, a set name can
be provided to automatically expand its relays (an error occurs if the
set contains no relays). Similarly, any command accepting naddrs can
reference a set to extract its naddrs.

Sets can also be merged by updating a set while specifying another
set in `--repo` merges their naddrs, while `--set-relays` merges their
relays. Removal follows the same pattern.

Signed-off-by: Awiteb <a@4rs.nl>
2025-06-01 12:12:09 +00:00
Awiteb
24e8522268 chore: Move the write relays definition to the end of the commands
To make it clear, we can review exactly what was collected instead of
having it spread throughout the body of the command.

Signed-off-by: Awiteb <a@4rs.nl>
2025-05-27 19:20:42 +00:00
Awiteb
f670859b92 chore: Remove the vector parameter from add_{read,write}_relays
Signed-off-by: Awiteb <a@4rs.nl>
2025-05-27 12:35:26 +00:00
Awiteb
15d834dc0f chore: Deduplicate tags
Signed-off-by: Awiteb <a@4rs.nl>
2025-05-27 08:45:20 +00:00
Awiteb
37cf601c01 refactor: Support more than one naddr instead of one
This commit supports multiple naddrs for sending issues to and searching
for repositories by extracting the embedded relays, and appending to the
address file instead of overwriting its previous contents. A header has
also been added to the `nostr-address` file to clarify its purpose.

This enhancement accommodates maintainers who distribute issue tracking
across multiple repositories, preventing confusion if the primary
maintainer steps down. Now, issues and patches will reference all
relevant repositories, not just one.

Note that repositories won't automatically include all maintainers'
addresses unless explicitly specified. Maintainers may manage a
repository under a project-specific public key rather than individual
keys. Addresses are only added to issues and patches when explicitly
provided via the command or written to the address file. This prevents
unintended inclusions and ensures clarity.

Suggested-by: DanConwayDev <DanConwayDev@protonmail.com>
Signed-off-by: Awiteb <a@4rs.nl>
2025-05-27 07:05:13 +00:00
Awiteb
ddea5028ee feat: Make the relays list optional
Signed-off-by: Awiteb <a@4rs.nl>
2025-05-24 12:30:40 +00:00
Awiteb
de68d61c3f feat: Enter repository as nip5
For example, `4rs.nl/n34` and `_@4rs.nl/n34`

Signed-off-by: Awiteb <a@4rs.nl>
2025-05-24 11:00:37 +00:00
Awiteb
02070c2868 feat: A --quote-to flag to quote the replied to content in the editor
Signed-off-by: Awiteb <a@4rs.nl>
2025-05-24 06:06:32 +00:00
Awiteb
15c0eaa5dc chore: Make commands module
Signed-off-by: Awiteb <a@4rs.nl>
2025-05-23 13:15:37 +00:00