| 63 | #[allow(clippy::ref_option_ref)] |
| 64 | #[cfg_attr(test, automock)] |
| 65 | pub(crate) trait GH { |
| 66 | /// Add labels to the provided issue. |
| 67 | async fn add_labels( |
| 68 | &self, |
| 69 | inst_id: u64, |
| 70 | owner: &str, |
| 71 | repo: &str, |
| 72 | issue_number: i64, |
| 73 | labels: &[&str], |
| 74 | ) -> Result<()>; |
| 75 | |
| 76 | /// Create a check run for the head commit in the provided pull request. |
| 77 | async fn create_check_run( |
| 78 | &self, |
| 79 | inst_id: u64, |
| 80 | owner: &str, |
| 81 | repo: &str, |
| 82 | issue_number: i64, |
| 83 | check_details: &CheckDetails, |
| 84 | ) -> Result<()>; |
| 85 | |
| 86 | /// Create a new discussion in the repository provided. |
| 87 | async fn create_discussion( |
| 88 | &self, |
| 89 | inst_id: u64, |
| 90 | owner: &str, |
| 91 | repo: &str, |
| 92 | category: &str, |
| 93 | title: &str, |
| 94 | body: &str, |
| 95 | ) -> Result<()>; |
| 96 | |
| 97 | /// Get all users allowed to vote on a given vote. |
| 98 | async fn get_allowed_voters( |
| 99 | &self, |
| 100 | inst_id: u64, |
| 101 | cfg: &CfgProfile, |
| 102 | owner: &str, |
| 103 | repo: &str, |
| 104 | org: Option<&String>, |
| 105 | ) -> Result<Vec<UserName>>; |
| 106 | |
| 107 | /// Get all repository collaborators. |
| 108 | #[allow(dead_code)] |
| 109 | async fn get_collaborators(&self, inst_id: u64, owner: &str, repo: &str) -> Result<Vec<UserName>>; |
| 110 | |
| 111 | /// Get reactions for the provided comment. |
| 112 | async fn get_comment_reactions( |
| 113 | &self, |
| 114 | inst_id: u64, |
| 115 | owner: &str, |
| 116 | repo: &str, |
| 117 | comment_id: i64, |
| 118 | ) -> Result<Vec<Reaction>>; |
| 119 | |
| 120 | /// Get configuration file. |
| 121 | async fn get_config_file(&self, inst_id: u64, owner: &str, repo: &str) -> Option<String>; |
| 122 |
nothing calls this directly
no outgoing calls
no test coverage detected