Skip to content

Commit c582891

Browse files
committed
changelog test update pr number fetch
1 parent 080a6e5 commit c582891

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/changelog_test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
github-token: ${{ secrets.GITHUB_TOKEN }}
3232
script: |
3333
const comment = core.getInput('comment');
34-
const { data: pullRequest } = await github.rest.pulls.list({
34+
const response = await github.rest.pulls.list({
3535
owner: github.context.repo.owner,
3636
repo: github.context.repo.repo,
37-
head: `${github.context.repo.owner}:${github.context.ref}`,
37+
head: `${github.context.repo.owner}:${github.event.pull_request.head.ref}`,
3838
});
39-
const prNumber = pullRequest[0].number;
40-
github.rest.issues.createComment({
39+
const prNumber = response.data[0].number;
40+
await github.rest.issues.createComment({
4141
issue_number: prNumber,
4242
owner: github.context.repo.owner,
4343
repo: github.context.repo.repo,

0 commit comments

Comments
 (0)