Repository navigation
Conversation
|
I was able to post a comment to a PR on one of my own repositories as a test case: tertsdiepraam/aoc2021#1
The YAML is: name: PostComment
on: [pull_request]
jobs:
postcomment:
runs-on: ubuntu-latest
steps:
- name: Publish the result if any change (spell check test)
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Comment posted!'
}) |
|
I wonder if there is some ownership issue going on here. Of course, we wouldn't want anyone to just open a PR which suddenly posts a bunch of comments on issues and pull requests. So github might be restricting the action until its merged or something like that? |
|
your repo is private but I trust you :)
Maybe? This is why I pushed Oh, I just noticed that we have "Issues: write" maybe it needs PullRequests too! I will try |
|
I think this explains the issue:
Oops, fixed :) |
|
I tried with pull_request_target but the PR doesn't start ... |
|
Okay so here's what I understand from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
|
This makes sense, because |
|
good idea, let's try then :) |
|
Looking great here: fingers crossed ;) |
|
I think this might work for the comment, but will not do what you expect because it will run on Do you mind if I give this a shot in another PR? |
|
@tertsdiepraam |
|
We're good now, right? |
No description provided.