v5.0.0
Breaking Changes
There are a couple of major improvements that are unfortunately breaking changes:
tools.context.issue
returns a different object
Thanks to @mheap, tools.context.issue
now returns { owner, repo, issue_number }
instead of { owner, repo, number }
. This is due to a change in the Octokit SDK. To have parity with pull requests, there is now also tools.context.pullRequest
, which returns { owner, repo, pull_number }
.
See #118 for more information!
Toolkit#getFile
is now Toolkit#readFile
The getFile
method has been renamed to readFile
, and the behavior has changed. It now uses fs.promises.readFile
under the hood, so it returns a promise:
const tools = new Toolkit({ ... })
const contents = await tools.readFile('README.md')
See #121 for more information!
tools.store
has been removed
This feature was added before the Actions runtime had a way to share data between actions. That now exists in the platform, as "outputs"! See #125 for the removal of Store
, and #120 for it's "replacement", tools.outputs
(thanks to @abouroubi ✨):
tools.outputs.example = 'foo'
Toolkit#runInWorkspace
is now Toolkit#exec
This method was useful, but @actions/exec
is built more with the Actions runner in mind. So, now Toolkit#exec
calls @actions/exec
! This will be more stable for the finicky, ephemeral environments of Actions.
See #123 for more information!
What’s Changed
- Fix deprecated issue/pull number context (#118) @mheap
- Moar tests (#126) @JasonEtco
- Toolkit#runInWorkspace => Toolkit#exec (#123) @JasonEtco
- Remove Store (#125) @JasonEtco
- Support github_token input in addition to env.GITHUB_TOKEN (#124) @JasonEtco
- feat(outputs): add outputs proxy to the toolkit (#120) @abouroubi
- Improve Toolkit#readFile (#121) @JasonEtco
- Updoots (#122) @JasonEtco