-
Notifications
You must be signed in to change notification settings - Fork 6
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
delete_previous_comments has no effect #245
Comments
Hi, Have you tried modifying the E2E test, that's available? Look at |
@rickardl I'll give that a try, thanks. |
Hey 👋🏻 I had a similar issue, specifically:
Line 398 in 9ec47e2
When evaluating, it comes out to: + if "githubApp" == "githubApp[bot]"
- if e.Node.Author.Login == getComments.Viewer.Login { Specifically, |
Thanks @bee-san for the fix in monzo#4! I've ported it to the new repo and it will soon be shipped. Because unfortunately, there is no hope that one can get any further support here (#246 was 2+y ago). But recent news is that the Cloud Foundry community is now maintaining a fork of this resource at cloudfoundry-community/github-pr-resource. On our Concourse installation at Gstack, that one is working fine. Maybe you guys can give a try and provide feedback there? (the new resource is a drop-in replacement; you only have to switch |
Indeed, in order to delete the correct comments, the golang code makes sure that comment's `Author.Login` is the same as current `Viewer.Login`. But with bot users, viewer's login is "githubApp[bot]" and author login is "githubApp". As a consequence, for the comparison to succeed, we need to remove any trailing "[bot]" suffix from both parties, and compare the resulting prefixes. This isue was originally submitted as telia-oss#245 and fixed later in monzo#4.
I'm passing
delete_previous_comments: true
in the parameters to my put step on this resource, along withcomment: my comment
. Check status is updated, the new comment gets added but the previous comments are not removed.I'm using a GitHub app token with read & write permissions on pull requests. Is there anything I'm missing?
The text was updated successfully, but these errors were encountered: