Skip to content
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

Suggestion: use sticky PR comment for tldr-bot #13754

Open
sebastiaanspeck opened this issue Sep 19, 2024 · 0 comments
Open

Suggestion: use sticky PR comment for tldr-bot #13754

sebastiaanspeck opened this issue Sep 19, 2024 · 0 comments

Comments

@sebastiaanspeck
Copy link
Member

sebastiaanspeck commented Sep 19, 2024

If a PR gets a lot of updates, it will sometimes also get a lot of comments via tldr-bot.
I recently found https://github.com/marocchino/sticky-pull-request-comment, which creates one comment which can be updated during the PR.

Before I open a PR to introduce it, I would like to check if others think this might be useful.
If we want to use this, the below is what needs to be added in the ci.yml. Next we should tweak the test.sh a little.

permissions:
  pull-requests: write

uses: marocchino/sticky-pull-request-comment@v2
with:
  header: tldr-bot
  hide_and_recreate: true
  hide_classify: "OUTDATED"
  path: tldr-bot.md
# Additional checks for GitHub Actions pull request builds.
# Only taken as suggestions, does not make the build fail.
function run_checks_pr {
  msgs=$(bash scripts/check-pr.sh)

  if [[ -n $msgs ]]; then
    echo -e "\nCheck PR reported the following message(s):\n$msgs\n" >&2
    echo 'Sending check results to PR.' >&2
    echo -n "$msgs" > tldr-bot.md
  fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant