This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow-get-workflow-origin.git
commit 15d83ef87a7549dc36622ec5bbe20e15849cecf7 Author: Jarek Potiuk <[email protected]> AuthorDate: Wed Oct 28 18:02:58 2020 +0100 Updated documentation for get workflow origin --- README.md | 5 +++-- dist/index.js | 2 +- src/main.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 601c99e..4947cd6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ <img alt="get-workflow-origin status" src="https://github.com/potiuk/get-workflow-origin/workflows/Test%20the%20build/badge.svg"></a> -# Get Workflow Runs action +# Get Workflow Origin action <!-- START doctoc generated TOC please keep comment here to allow auto update --> @@ -24,7 +24,8 @@ # Context and motivation Get Workflow Origin is an action that provides information about the pull requests that triggered the -workflow for the `workflow_run` and `pull_request` events. +workflow for the `pull_request` and `pull_request_review` events or for the `workflow_run` event +that is triggered by one of those events. Often in those events you want to get more information about the source run than the one provided directly via GitHub context. diff --git a/dist/index.js b/dist/index.js index ed5e583..7f7b836 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1486,7 +1486,7 @@ function findPullRequest(octokit, owner, repo, headRepo, headBranch, headSha) { return __awaiter(this, void 0, void 0, function* () { // Finds Pull request for this workflow run core.info(`\nFinding PR request id for: owner: ${owner}, Repo:${repo}, Head:${headRepo}:${headBranch}.\n`); - const pullRequests = yield octokit.paginate(octokit.pulls.list({ + const pullRequests = yield octokit.paginate(yield octokit.pulls.list({ owner, repo, head: `${headRepo}:${headBranch}` diff --git a/src/main.ts b/src/main.ts index b545f5f..87779b0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -44,7 +44,7 @@ async function findPullRequest( `\nFinding PR request id for: owner: ${owner}, Repo:${repo}, Head:${headRepo}:${headBranch}.\n` ) const pullRequests = await octokit.paginate( - octokit.pulls.list({ + await octokit.pulls.list({ owner, repo, head: `${headRepo}:${headBranch}`
