kanga333 / comment-hider Goto Github PK
View Code? Open in Web Editor NEWGithub Action to hide comments made by Github Action
License: MIT License
Github Action to hide comments made by Github Action
License: MIT License
Thank you for this action!
Currently, only the first 30 comments can be hidden.
When the comments are queried here
Line 38 in c12bb20
30
is used (see docs).
To get all comments, we would have to get the comments repeatedly, i.e. per_page=100
and then query consecutive page
s until we are done.
GITHUB_TOKEN
does not allow PRs from forked repositories to post comments, so the integration test does not work.
Instead, set a personal token to enable integration to work.
Hi ๐
I really like your action and I'd like to contribute a small change.
Currently this action hide all comments which is helpful but I think it would be great if the last comment was left visible. I think this will make most people's desires (usually you want to see the last annoying "your commit fails in CI" message)
If this is a feature you are interested in I'd love to open a PR with a possible implementation!
I wanted to use this action with on: workflow_run
, like this: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
But then it couldn't access the issue number (actually, pull request number), which must be provided as an explicit input to each actions when using on: workflow_run
.
I started working on a PR that adds an issue_number
input, so that you could do something like this, assuming the issue number is stored in issue_number.txt
:
- name: Read PR number
id: issue-number
run: echo "::set-output name=issueNumber::$(cat issue_number.txt)"
- uses: kanga333/comment-hider@... # version tag or full commit hash
name: Hide old comments
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ steps.issue-number.outputs.issueNumber }}
The problem is that it takes two steps to first make the issue number available in ${{ ... }}
syntax, and then to call the comment hider. Alternatively, the comment hider could read the issue number from a file:
- uses: kanga333/comment-hider@... # version tag or full commit hash
name: Hide old comments
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_number_file: issue_number.txt
Which way is better?
Would be nice if the comment in action.yml linked to https://docs.github.com/en/graphql/reference/enums#reportedcontentclassifiers
Github is showing warning about this action:
Warning
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: kanga333/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Would you please be able to update this action?
For anyone searching it, the error message for not finding issue number is Error: Not Found
with no other details. That could be improved too.
Originally posted by @Akuli in #26 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.