diff options
Diffstat (limited to 'src/bin/ngit/sub_commands/issue_create.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/issue_create.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/ngit/sub_commands/issue_create.rs b/src/bin/ngit/sub_commands/issue_create.rs index 0c4b677..4543823 100644 --- a/src/bin/ngit/sub_commands/issue_create.rs +++ b/src/bin/ngit/sub_commands/issue_create.rs | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | use anyhow::{Context, Result, bail}; | 1 | use anyhow::{Context, Result, bail}; |
| 2 | use ngit::client::{Params, send_events, sign_event}; | 2 | use ngit::{ |
| 3 | client::{Params, send_events, sign_event}, | ||
| 4 | content_tags::{dedup_tags, tags_from_content}, | ||
| 5 | }; | ||
| 3 | use nostr::{EventBuilder, Tag, TagStandard, ToBech32, nips::nip19::Nip19Event}; | 6 | use nostr::{EventBuilder, Tag, TagStandard, ToBech32, nips::nip19::Nip19Event}; |
| 4 | use nostr_sdk::Kind; | 7 | use nostr_sdk::Kind; |
| 5 | 8 | ||
| @@ -74,6 +77,11 @@ pub async fn launch( | |||
| 74 | tags.push(Tag::public_key(*pk)); | 77 | tags.push(Tag::public_key(*pk)); |
| 75 | } | 78 | } |
| 76 | 79 | ||
| 80 | // NIP-21 mention tags: q tags for cited events/addresses, p tags for cited | ||
| 81 | // pubkeys | ||
| 82 | tags.extend(tags_from_content(&body, Some(git_repo_path)).await?); | ||
| 83 | let tags = dedup_tags(tags); | ||
| 84 | |||
| 77 | let issue_event = sign_event( | 85 | let issue_event = sign_event( |
| 78 | EventBuilder::new(Kind::GitIssue, body).tags(tags), | 86 | EventBuilder::new(Kind::GitIssue, body).tags(tags), |
| 79 | &signer, | 87 | &signer, |