From the course: Advanced GitHub Actions

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Use actions/github in JavaScript actions

Use actions/github in JavaScript actions - GitHub Tutorial

From the course: Advanced GitHub Actions

Use actions/github in JavaScript actions

- [Narrator] Another key package in the actions toolkit is the action GitHub package. The first feature we'll explore with this package is its ability to expose the context that was passed to the action from the workflow. Using the context as a JSON object, we'll be able to access data like the event that triggered the workflow and the event payload as well. However, the real superpower of the GitHub package is providing an authenticated GitHub client. Using this client, also known as an Octokit client allows JavaScript actions to directly access the GitHub API. But before we get into these topics, I want to share some resources that might be helpful. I'll admit, when it comes to JavaScript actions, it can be hard to get started. I wanted to share a few resources that I refer to often when I need more information. The GitHub documentation section on webhook events and payloads is a great resource. It has examples on the…

Contents