-
-
Notifications
You must be signed in to change notification settings - Fork 847
Implemented hiding of outdated bot comments - #1976 #6550
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
Merged
roslynwythe
merged 96 commits into
hackforla:gh-pages
from
iancooperman:ga-hide-old-comments-1976
May 27, 2024
Merged
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
4d439c6
Added workflow_dispatch trigger to schedule-fri-0700.yml
iancooperman 49efa4a
Added function outline for helper function that determines if a bot w…
iancooperman 76a8b84
Added boolean statement to isCommentByBot helper function
iancooperman ad9f003
Added line to test output of github action in working branch
iancooperman d1e47a1
Moved testing output line
iancooperman eae7b64
Set a new commentByDays for testing purposes
iancooperman f8a43bc
Reverted last change
iancooperman 01d418e
Made edits for testing purposes
iancooperman 16fd6d0
Made small edit to that edit
iancooperman c32ae77
Reverted the edits
iancooperman b23895d
Made edits to eventTimestamp to pretend that timestamps are 8 days in…
iancooperman 61ab7ca
added debug line for eventTimestamp edit
iancooperman 4959c82
Added another debug line in main()
iancooperman 3059ce5
Added another debug line in main()
iancooperman 9aa7db7
Made edit to last debug line
iancooperman d5ce01a
Added yet another debug line to main()
iancooperman 622372c
Setting columnId myself instead of using a secret for testing purposes
iancooperman e28a5f7
whatever
iancooperman d1083fb
Just work please
iancooperman baf2b5d
edited line that's supposed to set eventTimeStamp to 8 days before th…
iancooperman 2cec537
this time?
iancooperman a2c9f69
this time?
iancooperman 20d7676
this time again?
iancooperman 538cfda
Added () to .getDate()
iancooperman e1185d8
Added better formatting for eventTypestamp debug
iancooperman 2647e0c
now will the timestamp show correctly?
iancooperman 8ae85df
Updated testing timing for timestamps
iancooperman cead392
Changed to 0
iancooperman d287f56
Let's see what the eventTimestamp is by default
iancooperman d6bc37d
Added additional debug logging to eventTimestamp
iancooperman 7ca0044
Modified formatting
iancooperman 475aad2
and again!
iancooperman bba1ed8
Let's figure out the exact type of eventTimeStamp
iancooperman 1ae247f
Wrote new code to change the dates for testing purposes
iancooperman 2381d65
There, now it should work.
iancooperman 7998a29
Logging timeline so I can understand its structure
iancooperman 7423495
Added preliminary code for hiding comments
iancooperman 7034f8e
let's test moment is recent
iancooperman 71a814b
Change the placement of the new if statement so it actually gets trig…
iancooperman c9ca823
Added debug line to make comment printout more distinct
iancooperman 19dd671
Now requiring https module
iancooperman c87c02b
Commenting out my previous rest request to get comments
iancooperman a5c6f9e
Attempted to retrieve node_id of relevant comments
iancooperman 5327c9d
Moving over to node-fetch from https
iancooperman 12c0879
or not
iancooperman 154dce0
Let's see if this does it
iancooperman 59a254b
Added a missing semicolon
iancooperman 62791ad
Did I add the PAT correctly?
iancooperman b6b50c2
Now passing PAT as an environment variable
iancooperman 7943d86
Added yet even more logic to pass the PAT
iancooperman 5064cd4
Added code to make https request to graphql API
iancooperman 6d78152
Passed the wrong variable name to the https request
iancooperman ddacc01
Added user-agent to headers
iancooperman a7c4ccd
Did the attribute need to be literally named 'query'?
iancooperman 1ae5508
Is the query variable written correctly now?
iancooperman dc4e4ac
Does removing the underscore in nodeid help?
iancooperman ba7da02
Was the query missing a comma?
iancooperman 73c08ac
Does adding extra quotations around the query help?
iancooperman 90b2b85
Does getting rid of the outer brackets help?
iancooperman b8f4065
Changed the casing of "String" in the query
iancooperman c59907d
Fixed typo in one instance of "$nodeid" in the query
iancooperman 91cfd16
Changed declared variable type in query from "String!" to "ID!"
iancooperman aeb2c1f
Removed debug console.logs added by myself and date testing adjustment
iancooperman 1d94052
Added a new debug log to investigate why comments aren't being hidden…
iancooperman dab07b4
Updated new debug log to include if comment is by bot
iancooperman 397faa5
Added eventType to new debug log
iancooperman 24a3bf6
Now looking specifically at eventType
iancooperman baac5c0
Determining if bot comments that were unhidden are regarded as not by…
iancooperman a6893bb
Determining if unhidden bot comments are regarded as recent
iancooperman 8913208
Welp
iancooperman 22a4068
Switching from using `eventTimestamp` to `eventObj.created_at`
iancooperman 731a915
Removed debug log, no longer needed.
iancooperman 16ab107
Reverted `secrets.HFLA_PROJECT_BOARD_TOKEN` name back to `secrets.HAC…
iancooperman 2173c2c
Replaced `HACK_FOR_LA_BOT` with `HACKFORLA_BOT_PA_TOKEN`
iancooperman 4f49ad0
Revert "Replaced `HACK_FOR_LA_BOT` with `HACKFORLA_BOT_PA_TOKEN`"
iancooperman 4b2c134
Revert "Reverted `secrets.HFLA_PROJECT_BOARD_TOKEN` name back to `sec…
iancooperman 534f356
Edited comment minimization code to include timeout between GraphQL r…
iancooperman 3ba24e2
Added missing definition for `req`
iancooperman 8ae3a68
Now added missing definition for `req`
iancooperman 4a3aecb
Increased base timeout length to 1.5s (from 1s)
iancooperman 710041c
Removed `setTimeout` and moved GraphQL code to its own function.
iancooperman a87267b
Added separate async function(s) for handling the minimization of com…
iancooperman 13060c5
logging node id for debugging purposes
iancooperman 04244c8
logging node id withing `minimizeComments()` for debugging purposes
iancooperman f10452d
Changed syntax of for-each loop in `minimizeComments` to better compl…
iancooperman 03691c0
Revised console output for minimizing comments
iancooperman 047de96
Adjusted attribute syntax for comment minimization logging
iancooperman eb98f39
Simplified comment minimization output
iancooperman b22a8d3
Removed pythonic syntax from console output, causing error
iancooperman ba5956e
Changed token name for usage in main repo
iancooperman d28cb76
Changed name of env secret `HACKFORLA_REPO_TOKEN` to `HACKFORLA_ADMIN…
iancooperman b2903e4
Removed extra spaces on line 142 of `add-label.js`
iancooperman 7943907
Added semicolon to end of line 154
iancooperman e5743b7
Removed extra line at line 189 of `add-label.js`
iancooperman d3d8571
Removed unused variable `outdatedCommentCount` in `isTimelineOutdated()`
iancooperman 628a845
Removed accidentally created file `ga-hide-old-comments-1976.code-wor…
iancooperman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.