-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Comment checkdiff output on PRs #1548
Conversation
ad6c40a
to
6673d20
Compare
6673d20
to
0a6d18d
Compare
@ISSOtm You mentioned this would be a nice feature; can you look into why it's failing with 403? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing that the 403 might be stemming from the wrong endpoint being used? IDRK, this is just a guess. (I used https://octokit.github.io/rest.js/v21/#pulls-create-review as a reference.)
make checkdiff "BASE_REF=${{ github.event.pull_request.base.sha }}" | tee log | ||
- name: Comment | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `**Checkdiff:** <pre><code>${{steps.checkdiff.outputs.response}}</code></pre>` | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make checkdiff "BASE_REF=${{ github.event.pull_request.base.sha }}" | tee log | |
- name: Comment | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `**Checkdiff:** <pre><code>${{steps.checkdiff.outputs.response}}</code></pre>` | |
}) | |
make checkdiff "BASE_REF=${{ github.event.pull_request.base.sha }}" | |
- name: Comment | |
if: ${{ failure() && steps.checkdiff.conclusion == 'failure' }} # Only create the review if `checkdiff` found some errors. | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.pulls.createReview({ | |
pull_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `**Checkdiff:** <pre><code>${{ steps.checkdiff.outputs.response }}</code></pre>`, | |
event: "REQUEST_CHANGES", | |
}) |
...and we'd make checkdiff
return a non-zero error status if any checks fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think checkdiff
should ever fail that way: false positives are expected sometimes, and CI as a whole shouldn't be marked as ❌ just because of that.
Closing this for now, maybe we'll come back to it in the Rust port. |
No description provided.