Skip to content

Commit 01409ef

Browse files
committed
Relocate labels module inside of github
1 parent 97736f5 commit 01409ef

File tree

6 files changed

+5
-8
lines changed

6 files changed

+5
-8
lines changed

src/github.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::labels;
21
use crate::team_data::TeamClient;
32
use anyhow::{Context, anyhow};
43
use async_trait::async_trait;
@@ -17,6 +16,8 @@ use std::{
1716
};
1817
use tracing as log;
1918

19+
pub mod labels;
20+
2021
pub type UserId = u64;
2122
pub type PullRequestNumber = u64;
2223

File renamed without changes.

src/handlers/assign.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
2323
use crate::db::issue_data::IssueData;
2424
use crate::db::review_prefs::{RotationMode, get_review_prefs_batch};
25-
use crate::github::UserId;
25+
use crate::github::{UserId, labels};
2626
use crate::handlers::pr_tracking::ReviewerWorkqueue;
27-
use crate::labels;
2827
use crate::{
2928
config::AssignConfig,
3029
github::{self, Event, FileDiff, Issue, IssuesAction, Selection},

src/handlers/autolabel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
config::AutolabelConfig,
3-
github::{IssuesAction, IssuesEvent, Label},
3+
github::{IssuesAction, IssuesEvent, Label, labels::UnknownLabels},
44
handlers::Context,
55
};
66
use anyhow::Context as _;
@@ -209,7 +209,6 @@ pub(super) async fn handle_input(
209209
match event.issue.add_labels(&ctx.github, input.add).await {
210210
Ok(()) => {}
211211
Err(e) => {
212-
use crate::labels::UnknownLabels;
213212
if let Some(err @ UnknownLabels { .. }) = e.downcast_ref() {
214213
event
215214
.issue

src/handlers/relabel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
use crate::team_data::TeamClient;
1212
use crate::{
1313
config::RelabelConfig,
14-
github::{self, Event},
14+
github::{self, Event, labels::UnknownLabels},
1515
handlers::Context,
1616
interactions::ErrorComment,
17-
labels::UnknownLabels,
1817
};
1918
use parser::command::relabel::{LabelDelta, RelabelCommand};
2019

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pub mod github;
1818
pub mod handlers;
1919
mod interactions;
2020
pub mod jobs;
21-
pub mod labels;
2221
pub mod notification_listing;
2322
pub mod payload;
2423
mod rfcbot;

0 commit comments

Comments
 (0)