Implemented hiding of outdated bot comments - #1976#6550
Implemented hiding of outdated bot comments - #1976#6550roslynwythe merged 96 commits intohackforla:gh-pagesfrom
Conversation
… the past for testing purposes
…e real time stamp
…y with conventional JS syntax
|
@roslynwythe Sorry it's taken so long, but I've added the wait. Go ahead and try it out again when you get the chance. |
|
@iancooperman Using a PAT with the "repo" group of scopes in my fork of the repo, all of the "please add update" bot comments older than 7 days were hidden successfully. Thank you for adding the wait and your patience with changing the token. Prior to merge we need to create HACKFORLA_REPO_TOKEN. Please advise @t-will-gillis, if you would like me to create that secret. |
|
Hi @roslynwythe and @iancooperman because of another automation's requirements, the
@iancooperman sorry for the delay- I will try to look at this tonight. |
There was a problem hiding this comment.
Hey @iancooperman - Great job. I tested this and for an issue in the "In Progress (actively working)" column, the bot-generated comments older than 7 days are being hidden.
As I mentioned in a previous comment, the HACKFORLA_ADMIN_TOKEN is already upgraded to include the "repo" scope because it was needed for a different automation, and so it can be used to replace HACKFORLA_REPO_TOKEN.
I noticed a few more things that aren't having a negative impact on the code, but that likely (?) CodeQL will flag at some point. (Many/ most are from before you worked on it)
- There are a lot of missing semi-colons: eg. lines 15-20, 47-48, 52, 93, 97, 100, and many more
I triggered CodeQL on a fork and it found:
- Line 43: this variable not being used
- Line 118: variable not being used
- Line 286
loginsmissing a declaration - Line 278
assigneesLoginsmissing a declaration
I am not sure why thus far the main repo's CodeQL has not flagged these, but might be worth it to fix these (potential) alerts.
To recap about the token, these are the scopes for HACKFORLA_ADMIN_TOKEN:
- repo ('Full control of private repositories')
- admin:org_hook
- write:org (under 'admin:org')
Submitting this as a comment for right now. Thanks for your ongoing work...
|
@t-will-gillis @roslynwythe I just changed the name of the secret in |
t-will-gillis
left a comment
There was a problem hiding this comment.
- The file
ga-hide-old-comments-1976.code-workspaceis included in the commit - what is this file? - In
add-label.js:- please confirm whether the variable at line 118 is being used, if not please remove
- there are extra spaces on line 142. please remove
- extra line at 189, please remove
- to prevent future CodeQL alerts, please add semi-colon at end of line 154
Thanks
ETA: 5/16 EoD |
|
@t-will-gillis I've made the requested changes in |
t-will-gillis
left a comment
There was a problem hiding this comment.
Hey @iancooperman Fantastic- I did one final test and everything seems to be working as intended.
Thanks for all of your work on this!
|
Hi @roslynwythe Whenever possible please add you availability and ETA for this PR. Thanks! |
roslynwythe
left a comment
There was a problem hiding this comment.
Thank you @iancooperman for your work on this complex issue.
Fixes #1976
What changes did you make?
Why did you make the changes (we will use this info to test)?