From 4750f569317a8db9cb8ba1ccb0bdf6dbc8e0be80 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Thu, 29 Aug 2019 18:51:10 -0400 Subject: [PATCH] Add usage information to README --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index d3d1b9a..4d189d2 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,13 @@ This action makes it easy to quickly write a script in your workflow that uses the GitHub API and the workflow execution context. +In order to use this action, a `script` input is provided. The value of that input should be the body of an asynchronous function call. Two arguments will be provided: + +- `github` A pre-authenticated [octokit/rest.js](https://github.com/octokit/rest.js) client +- `context` An object containing the [context of the workflow run](https://github.com/actions/toolkit/tree/master/packages/github) + +Since the `script` is just a function body, these values will already be defined, so you don't have to (see examples below). + See [octokit/rest.js](https://octokit.github.io/rest.js/) for the API client documentation. ## Examples