pontil/context
Pontil context provides the GitHub Actions execution context and webhook event
types for Gleam, supporting both Erlang and JavaScript targets. It is the Gleam
equivalent of the context object from @actions/github, part
of the GitHub Actions toolkit.
Usage
gleam add pontil_context@1
import gleam/result
import pontil/context
pub fn main() {
let ctx = context.new()
use pr <- result.try(context.load_event(
event_name: ctx.event_name,
converter: context.event_to_pull_request,
))
let base_sha = pr.pull_request.base.sha
let head_sha = pr.pull_request.head.sha
// ...
}
Semantic Versioning
Pontil context follows Semantic Versioning 2.0.