Skip to content

Commit

Permalink
v0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hinto-janai committed Jun 24, 2024
1 parent 32dd897 commit 1f168f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Parameters are delimited by spaces, e.g.:
```
`!agenda` expects a JSON array containing JSON strings:
```
!agenda ["Greetings", "Updates", "New Agenda Item"];
!agenda ["New Agenda Item", "New Item 2"];
```

## Config
Expand Down
5 changes: 4 additions & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ pub static CUPRATE_MATRIX_ROOM_ID: Lazy<OwnedRoomId> =
// pub static CUPRATE_MATRIX_ROOM_ID: Lazy<OwnedRoomId> =
// Lazy::new(|| RoomId::parse("!SrjNVhHuHOWcFfYRfj:monero.social").unwrap());

//---------------------------------------------------------------------------------------------------- Matrix IDs
//---------------------------------------------------------------------------------------------------- IDs
/// TODO
pub const MOO_GITHUB_ID: &str = "moo900";

/// TODO
pub static MOO_MATRIX_ID: Lazy<OwnedUserId> =
Lazy::new(|| user_id!("@moo:monero.social").to_owned());
Expand Down
8 changes: 3 additions & 5 deletions src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use tracing::{info, instrument, trace};

use crate::{
constants::{
CONFIG, CUPRATE_GITHUB_PULL_API, MONERO_META_GITHUB_ISSUE_API, MOO_USER_AGENT,
TXT_CUPRATE_MEETING_PREFIX, TXT_CUPRATE_MEETING_SUFFIX,
CONFIG, CUPRATE_GITHUB_PULL_API, MONERO_META_GITHUB_ISSUE_API, MOO_GITHUB_ID,
MOO_USER_AGENT, TXT_CUPRATE_MEETING_PREFIX, TXT_CUPRATE_MEETING_SUFFIX,
},
pull_request::{PullRequest, PullRequestError},
};
Expand Down Expand Up @@ -156,9 +156,7 @@ pub async fn find_cuprate_meeting_issue(

let mut second = false;
for resp in responses {
if ["boog900", "moo900"].contains(&resp.user.login.as_str())
&& resp.title.contains("Cuprate Meeting")
{
if resp.user.login == MOO_GITHUB_ID && resp.title.contains("Cuprate Meeting") {
if find_last_issue {
if second {
return Ok((resp.number, resp.title));
Expand Down

0 comments on commit 1f168f8

Please sign in to comment.