We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23b2cb8 commit c40f797Copy full SHA for c40f797
1 file changed
generator/src/main.rs
@@ -91,9 +91,20 @@ enum Mode {
91
},
92
}
93
94
+fn init_github() -> Result<()> {
95
+ let builder = if let Ok(token) = std::env::var("GITHUB_TOKEN") {
96
+ octocrab::OctocrabBuilder::new().personal_token(token)
97
+ } else {
98
+ octocrab::OctocrabBuilder::new()
99
+ };
100
+ octocrab::initialise(builder)?;
101
+ Ok(())
102
+}
103
+
104
#[async_std::main]
105
async fn main() -> Result<()> {
106
color_eyre::install()?;
107
+ init_github()?;
108
match Mode::from_args() {
109
Mode::Lint { config_file, print } => {
110
let config = Config::load(&config_file).await?;
0 commit comments