diff --git a/.github/actions/comment/index.js b/.github/actions/comment/index.js index 6fa25ccfa36..10e52fde901 100644 --- a/.github/actions/comment/index.js +++ b/.github/actions/comment/index.js @@ -6,18 +6,9 @@ run(); async function run() { try { - let {data: prs} = await octokit.repos.listPullRequestsAssociatedWithCommit({ - ...github.context.repo, - commit_sha: github.context.sha - }); - - if (!prs) { - return; - } - await octokit.issues.createComment({ ...github.context.repo, - issue_number: prs[0].number, + issue_number: github.context.payload.number, body: `Build successful! [View the storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${github.context.sha}/index.html)` }); } catch (error) { diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 416382b4e02..448adec94f9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,5 +1,5 @@ name: Test -on: [push] +on: [pull_request] jobs: build: runs-on: ubuntu-latest