-
-
Notifications
You must be signed in to change notification settings - Fork 8
conditionally create comment #91
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
Conversation
c051ac8
to
563e69d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 20 21 +1
Lines 1436 1502 +66
=========================================
+ Hits 1436 1502 +66 ☔ View full report in Codecov by Sentry. |
This approach should actually expedite CI runs that don't use I also prioritized feedback features that don't require special permissions. Meaning, if the CI run fails due to inadequate permissions, the steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: linter
# allow use of outputs in case of permission errors
continue-on-error: true
with:
# no GITHUB_TOKEN in env means no permission for comments
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1 |
ae8784d
to
2c3e9a8
Compare
This better satisfies the maximum comment length imposed by GitHub while leaving the step summary length unhindered. An added benefit here is that we only create a comment when it is needed. Previously, we were creating a comment to also get a tally of checks failed.
also prefer to use kwargs for function calls to avoid mismatching values
8fc4d2b
to
fc94590
Compare
I'm confident enough that this is good to merge now. I added a test to make sure (& even manually inspected the comment output as markdown). |
tests length limit for thread-comment vs step-summary save test artifacts to temp path (for manual inspection)
fc94590
to
3d923dc
Compare
This better satisfies the maximum comment length imposed by GitHub while leaving the step summary length unhindered.
An added benefit here is that we only create a comment when it is needed. Previously, we were creating a comment to also get a tally of checks failed.
resolves #89