Rusty-Actions
A rust translation of @actions/github.
Find the documentation here.
Installation
cargo add actions-github
Usage
// Obtain the context from the action worker
use get_context;
use logger;
info;
let data = get_context.unwrap;
debug;
// Produce an output
set_output;
Works well with octocrab
:
use ;
use get_context;
use Octocrab;
let token = get_input.unwrap;
let crab = builder.personal_token.build;
initialise;
let context = get_context;
let org = context.repo.owner;
let repo = context.repo.repo;
let pulls = instance.pulls.list
// Output how many PRs are in the repository
set_output;