Skip to content

Commit

Permalink
fix: Add missing declaration for "bundlewatch-github-token" input (#8)
Browse files Browse the repository at this point in the history
* Rename token variable

* Add missing declaration for "bundlewatch-github-token" input
  • Loading branch information
mkai authored Jul 10, 2020
1 parent 84623e6 commit 14a30ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Bundlewatch Github Action'
description: 'Run bundlewatch against your PR to keep those bundles in check! Update your package.json according to bundlewatch config'
author: 'Jacky Efendi'
inputs:
bundlewatch-github-token:
description: 'A token to authenticate with the Bundlewatch service. Set this as a secret in your GitHub repository'
required: true
build-script:
description: 'Optional — The build script for your project. Will be run before running bundlewatch'
required: false
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const getBranchNameFromRef = (ref: string) => {
async function run() {
try {
const buildScript = core.getInput('build-script');
const bundlesizeGithubToken = core.getInput('bundlewatch-github-token');
const bundlewatchGithubToken = core.getInput('bundlewatch-github-token');

const githubPayload = github.context.payload;

Expand All @@ -26,7 +26,7 @@ async function run() {
core.exportVariable('CI_REPO_NAME', repoName);
core.exportVariable('CI_COMMIT_SHA', commitSHA);
core.exportVariable('CI_BRANCH', branchName);
core.exportVariable('BUNDLEWATCH_GITHUB_TOKEN', bundlesizeGithubToken);
core.exportVariable('BUNDLEWATCH_GITHUB_TOKEN', bundlewatchGithubToken);

if (buildScript) {
console.log(`Running build script: "${buildScript}"`);
Expand Down

0 comments on commit 14a30ce

Please sign in to comment.