-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish a comment when changes with the GNU testsuite are identified #4006
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:
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
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.