1.0.0 • Published 5 years ago
octokit-plugin-action-context v1.0.0
octokit-plugin-action-context
Adds
octokit.contextobject with all things relevant when run in a GitHub Action context
Usage
Browsers
octokit-plugin-action-context is not meant for browser usage.
Node
Install with npm install @octokit/core octokit-plugin-action-context. Optionally replace @octokit/core with a core-compatible module
const { Octokit } = require("@octokit/core");
const { actionContext } = require("octokit-plugin-action-context");const { Octokit } = require("@octokit/action");
const { actionContext } = require("octokit-plugin-action-context");
const OctokitWithContext = Octokit.plugin(actionContext);
const octokit = new OctokitWithContext();
const {
payload,
eventName,
sha,
ref,
workflow,
action,
actor,
repo,
issue,
} = octokit.context;Contributing
See CONTRIBUTING.md
License
1.0.0
5 years ago