diff --git a/action.yml b/action.yml index 71d68dc..8593981 100644 --- a/action.yml +++ b/action.yml @@ -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.' diff --git a/main.js b/main.js index 7a29e56..b95bf6c 100644 --- a/main.js +++ b/main.js @@ -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');