Skip to content

Commit

Permalink
Use a single variable for repository name to simplify workflow
Browse files Browse the repository at this point in the history
specification.
  • Loading branch information
Kevinjil committed Jun 3, 2022
1 parent f07f142 commit 1ba7bb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ inputs:
githubToken:
description: 'The GitHub authentication token to use in the action.'
required: true
repoOwner:
description: 'The GitHub user or organisation that owns the plugin source repo.'
required: true
repoName:
description: 'The GitHub repository name of the plugin source repo.'
repository:
description: 'The GitHub repository name of the plugin source repo in format "user/repo-name".'
required: true
pagesBranch:
description: 'The GitHub pages source branch on which the repository file is committed.'
Expand Down
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ async function commit(octokit, repo, branch, path, message, content) {
async function run() {
// Get input values.
const githubToken = core.getInput('githubToken', { required: true });
const repoOwner = core.getInput('repoOwner', { required: true });
const repoName = core.getInput('repoName', { required: true });
const repository = core.getInput('repository', { required: true });
const pagesBranch = core.getInput('pagesBranch', { required: true });
const pagesFile = core.getInput('pagesFile', { required: true });

const octokit = github.getOctokit(githubToken);
const repo = { owner: repoOwner, repo: repoName };
const repoParts = repository.split('/')
const repo = { owner: repoParts[0], repo: repoParts[1] };

// Get the global plugin properties using the build yaml file.
const buildConfig = await getYaml(octokit, repo, 'build.yaml');
Expand Down

0 comments on commit 1ba7bb8

Please sign in to comment.