Repository navigation
Conversation
|
Hi @cx-artur-ribeiro! Thanks again for taking care of #160/#161 via #162. Could you or another maintainer take a look at this PR when you have a chance? It addresses a separate GHES/custom-identity issue: when KICS posts its PR comment through an identity other than One reason this may have been "missed": #151 appears to be affected by a GitHub discovery/Search/API inconsistency.
I'm reporting the Search/API inconsistency to GitHub separately. I don't know the root cause, but it may explain why this PR has been difficult to discover. Happy to rebase or refresh the branch against current Thanks! |
Quick update regarding the GitHub Search/API indexing issue mentioned above: After posting my previous comment, PR #151 became visible again in the repository's pull request list. The repository previously showed 5 open PRs in the navigation tab but only 4 in the actual list. It now correctly displays all 5, including this PR. It looks like adding a comment may have triggered a reindex or metadata refresh, although the root cause remains unknown. So the PR discovery issue appears to be resolved. But the "real issue", is still pending review ;). Thanks! |
|
Hi @svg153 , I reviewed this and reproduced the scenario you describe. However, while testing this I found a second, independent cause of the same symptom. I opened #163 with both changes:
I also tested the case I was unsure about on a throwaway fork of the action. Two things I did not cover, so you know the limits:
If you prefer, you can add the pagination change to your PR and I will close mine. Thanks for exposing the problem and for the fix! |
Summary
This PR updates the PR comment matching logic to identify KICS comments by their body marker (
![kics-logo]() instead of matching bygithub-actions[bot]user.Why
In GitHub Enterprise and custom setups, comments can be published by GitHub Apps, PAT users, or other bot identities. In those cases, matching by
github-actions[bot]fails and KICS does not detect its previous comment correctly.Behavior after this change
Deletion case
If the previous KICS comment was deleted, there is nothing to update, so creating a new comment is the expected behavior. This keeps the action resilient and avoids depending on a specific author identity.
Change scope
src/commenter.js: remove author-login dependency and use optional chaining for body check.Related: #53 and #126