-
Notifications
You must be signed in to change notification settings - Fork 21
Post duplicate annotations when run action again #58
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
Comments
I noticed this too when testing all the supported version of clang-tools with a workflow matrix. We're not actually using the REST API to make annotations, rather we're using github workflow log commands. We could remove duplicate annotations if we use the REST API, but it isn't exactly the same as removing duplicate thread comments. I'm not sure if we can sneak in a HTML comment like we do for thread comments. If I recall correctly, the annotations' author is the workflow run count (or something similar), not a generic constant bot ID number. As far as I know, there isn't a workflow log command that allows removing annotations. I'm not too concerned about duplicate annotations because why would anyone run the same action more than once on the same file(s)? Can you think of a use case for this (other than our own development purposes)? |
We could throw in an option to disable annotations like the |
I used the default configuration as follows. when I push, it will add annotations, when I create PR, it will add annotations again. on:
push:
paths-ignore: "docs/**"
pull_request:
paths-ignore: "docs/**" |
Yes, it's good to support disabled annotations. I prefer to use annotations instead of comments, so it should be best if this problem could be solved. |
oh, that could be solved by configuring the workflow to execute the action only when a PR is opened or synchronized (specifically not when closed). on:
pull_request:
types: [opened, synchronize, reopened] # default includes `closed` event |
ok I'll add the option to disable the annotations; it should be rather easy. |
Yes, if only one event is configured, that won't happen. so the example in README may also need to be updated. |
I noticed when the same actions run again, the annotations also are posted again. @2bndy5 If possible not send duplicate annotations?
The test example is here: https://github.com/shenxianpeng/test-cpp-linter-action/pull/17/files
The text was updated successfully, but these errors were encountered: