Introduction

Completed

GitHub Script is a workflow action that provides you with access to the GitHub API from within your GitHub Actions. It offers convenient support for any API usage available in octokit/rest.js.

Suppose you maintain a vibrant GitHub repository. Your project has a substantial number of consumers and contributors, and you want to make sure they have a welcoming experience. You also find that the responsibilities of managing the team's planning and workload can really add up. You need a solution that allows you to hand off some of the mundane tasks to automation so that you can focus on areas where you really add value. You know that GitHub offers an API that will let you automatically reply to new issues and begin the triage workflow for new bug reports. You just haven't invested the time in figuring it all out, until now.

In this module, you'll learn how to interact with the GitHub API from a GitHub Actions workflow by using GitHub Script.

Learning objectives

In this module, you'll:

  • Use GitHub Script in your workflow.
  • Comment on issues using octokit.
  • Add issues to a project board using octokit.
  • Use the workflow expression syntax to filter when jobs run in a workflow.

Prerequisites

  • A GitHub account
  • The ability to navigate and edit files in GitHub
  • Familiarity with GitHub Actions
  • Familiarity with CI/CD

We recommend that you complete Automate development tasks by using GitHub Actions before beginning this module.