Crate actions_github
source ·Expand description
§Rusty-Actions
A rust translation of @actions/github.
Find the documentation here.
Work in progress: This library is being developed.
§Work in progress
- Context object
- get_input method
- set_output method
- logging methods
§Installation
cargo add actions-github
§Usage
use actions_github::context::get_context;
let data = get_context().unwrap();
println!("Event is {}", data.event_name);Works well with octocrab:
use actions_github::core::get_input;
use actions_github::context::get_context;
use octocrab::Octocrab;
let token = get_input("GITHUB_TOKEN").unwrap();
let crab = Octocrab::builder().personal_token(token).build();
octocrab::initialise(crab.unwrap());
let context = get_context();
let org = context.repo.owner;
let repo = context.repo.repo;
let pulls = octocrab::instance().pulls(owner, repo).list()Modules§
- Context related utilities