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

feat: Trim backticks from MR comments (for Gitlab) #5244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Unibozu
Copy link

@Unibozu Unibozu commented Jan 18, 2025

what

Small change to trim backticks (`) from MR comments to help with copy pasting atlantis commands from Gitlab. This is in addition to trimming whitespace.

why

Gitlab adds backticks when copy pasting code, which currently fails with atlantis and requires having to remove them before submitting the comment.

For example, copying this pre-populated code

image

Becomes

image

tests

Added a unit test

@Unibozu Unibozu requested review from a team as code owners January 18, 2025 21:38
@Unibozu Unibozu requested review from GenPage, nitrocode and X-Guardian and removed request for a team January 18, 2025 21:38
@dosubot dosubot bot added feature New functionality/enhancement go Pull requests that update Go code labels Jan 18, 2025
@github-actions github-actions bot removed the feature New functionality/enhancement label Jan 18, 2025
@Unibozu Unibozu changed the title Trim backticks from comments feat: Trim backticks from MR comments Jan 18, 2025
@Unibozu Unibozu changed the title feat: Trim backticks from MR comments feat: Trim backticks from MR comments (for Gitlab) Jan 18, 2025
Signed-off-by: Clement Debiaune <[email protected]>
@lukemassa
Copy link
Contributor

This doesn't change the appearance of the comment, right? I think we still want the suggested command to appear as a "command" in backticks, is that formatting handled elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants