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

ci: use sticky-pull-request-comment #13758

Closed
wants to merge 11 commits into from

Conversation

sebastiaanspeck
Copy link
Member

@sebastiaanspeck sebastiaanspeck commented Sep 20, 2024

#13754

Note

Haven't tested it yet.

This snippet from the send-to-bot.py has to be ported to the markdown file:

COMMENT_ERROR = """
The [build](https://github.com/tldr-pages/tldr/actions/runs/{build_id}) for this PR failed with the following error(s):

{content}

Please fix the error(s) and push again.
"""

COMMENT_CHECK = """
Hello! I've noticed something unusual when checking this PR:

{content}

Is this intended? If so, just ignore this comment. Otherwise, please double-check the commits.
"""

@github-actions github-actions bot added the tooling Helper tools, scripts and automated processes. label Sep 20, 2024
@sebastiaanspeck sebastiaanspeck marked this pull request as draft September 20, 2024 08:14
@sebastiaanspeck sebastiaanspeck force-pushed the feature/use-sticky-comment branch 3 times, most recently from 191d5bd to 11635f2 Compare September 20, 2024 08:30
@kbdharun kbdharun self-assigned this Sep 20, 2024
@sebastiaanspeck sebastiaanspeck force-pushed the feature/use-sticky-comment branch from bb293d1 to 57f57af Compare September 20, 2024 17:12
@sebastiaanspeck sebastiaanspeck force-pushed the feature/use-sticky-comment branch 2 times, most recently from 6bf21c3 to 2303397 Compare September 20, 2024 17:49
@sebastiaanspeck sebastiaanspeck force-pushed the feature/use-sticky-comment branch from 2303397 to 3c160b7 Compare September 20, 2024 17:51
@sebastiaanspeck
Copy link
Member Author

Hmm... testing this makes me wonder how good it works.. https://github.com/tldr-pages/tldr/actions/runs/10964192211/job/30447309092#step:10:28 - it fails, but looking at the Action, adding

permissions:
  pull-requests: write

is all that is needed. I even tried it using a PAT

@sebastiaanspeck
Copy link
Member Author

In the upcoming few weeks I will be less active, so if anyone wants to take over (maybe in the context of hacktoberfest), feel free to do so!

@sebastiaanspeck
Copy link
Member Author

Right now, it will only work if the PR is coming from tldr-pages/tldr, not when coming from a fork. There is a related issue in the Action itself, but I already have tried that one.

See #13773 for success and #13760 for failure

@sebastiaanspeck
Copy link
Member Author

I give up for now, I also tried using a different Action (#13774), but that gives me the same problem. I guess we need to adjust something in this repository to get it working. @kbdharun do you maybe have an idea?

@sebastiaanspeck
Copy link
Member Author

Trying a different strategy since the tldr-bot itself is working great: #13775

@sebastiaanspeck sebastiaanspeck deleted the feature/use-sticky-comment branch September 21, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Helper tools, scripts and automated processes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants