mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 03:57:27 +00:00
Merge pull request #117 from robyoung/fix-pull-request-test-for-forks
Fix PR test workflow for forks
This commit is contained in:
commit
e86864dfd7
1 changed files with 17 additions and 17 deletions
8
.github/workflows/pull-request-test.yml
vendored
8
.github/workflows/pull-request-test.yml
vendored
|
|
@ -20,10 +20,9 @@ jobs:
|
||||||
issue_number: context.payload.number,
|
issue_number: context.payload.number,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Find any comment already made by the bot.
|
if (context.payload.pull_request.head.repo.full_name !== 'actions/github-script') {
|
||||||
const botComment = comments.find(comment => comment.user.id === 41898282)
|
console.log('Not attempting to write comment on PR from fork');
|
||||||
const commentBody = "Hello from actions/github-script! (${{ github.sha }})"
|
} else {
|
||||||
|
|
||||||
if (botComment) {
|
if (botComment) {
|
||||||
await github.issues.updateComment({
|
await github.issues.updateComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
|
|
@ -39,3 +38,4 @@ jobs:
|
||||||
body: commentBody
|
body: commentBody
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue