Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Sep 17, 2021
1 parent 9fc91f6 commit 4f85970
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/github_app_authentication.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use octocrab::models::{InstallationToken, Repository};
use octocrab::params::apps::CreateInstallationAccessToken;
use octocrab::{create_jwt, Octocrab};
use octocrab::Octocrab;

#[tokio::main]
async fn main() -> octocrab::Result<()> {
let app_id = read_env_var("GITHUB_APP_ID");
let app_private_key = read_env_var("GITHUB_APP_PRIVATE_KEY");

let token = create_jwt(app_id.parse::<u64>().unwrap().into(), app_private_key).unwrap();
let token = octocrab::auth::create_jwt(app_id.parse::<u64>().unwrap().into(), app_private_key).unwrap();

let octocrab = Octocrab::builder().personal_token(token).build()?;

Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ pub use self::{
actions, activity, apps, current, events, gists, gitignore, issues, licenses, markdown,
orgs, pulls, repos, search, teams, workflows,
},
auth::create_jwt,
error::{Error, GitHubError},
from_response::FromResponse,
page::Page,
Expand Down

0 comments on commit 4f85970

Please sign in to comment.