apache / apache/arrow

[Dev] Comment bot embeds closes comment on code block

Open
#14,979 0 comments 0 reactions 0 assignees View on GitHub
Component: Developer Tools Status: needs champion Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

### Describe the bug, including details regarding any error messages, version, and platform.

I've noticed a minor bug on the comment bot adding the `Closes #xxxx` comment on the body of a PR.
If the PR body ends with a code block (triple backtick) the comment seems to be inserted as part of the code block.
See the image attached and and example on this issue: https://github.com/apache/arrow/pull/14978
![image](https://user-images.githubusercontent.com/639755/207923466-e42ae3ec-f3ef-47e9-80eb-bc19d85ac57c.png)
The expectation is to be added like:
![image](https://user-images.githubusercontent.com/639755/207923813-c4c56006-423b-42c7-a381-db3c9e0a04fa.png)

### Component(s)

Developer Tools

Contributor guide

Open the contributing guide

Research direction

Use pull request #14978 to reproduce how the comment bot handles a PR body ending in a triple-backtick code block. Locate the bot entry point and any relevant tests, then verify that the “Closes #xxxx” comment appears outside the closing code fence.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.