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

sourcePullRequest.title contains escaped characters #490

Closed
azatoth opened this issue Feb 14, 2024 · 4 comments
Closed

sourcePullRequest.title contains escaped characters #490

azatoth opened this issue Feb 14, 2024 · 4 comments

Comments

@azatoth
Copy link

azatoth commented Feb 14, 2024

I have following setting in my .backportrc.json:

{
  "prTitle": "{{sourcePullRequest.title}} | backport for {{targetBranch}}"
}

If the original pull request had a title like Don't do X and Y, the backport's title now becomes Don't do X and Y |backport for myBranch.

@azatoth
Copy link
Author

azatoth commented Feb 27, 2024

So this isn't actually a issue as I didn't realize first it's Handlebars, and I should just have used triple brackets instead

@azatoth azatoth closed this as completed Feb 27, 2024
@sorenlouv
Copy link
Owner

Sorry for the slow reply. Glad you got it solved!

@azatoth
Copy link
Author

azatoth commented Feb 28, 2024

Sorry for the slow reply. Glad you got it solved!

No problem; I realized I could fix my problem by using {{{sourcePullRequest.title}}} instead. Though I assume the more permanent and proper solution is to add {noEscape: true} option to Handlebars.compile()

@sorenlouv
Copy link
Owner

Fixed in #495

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

2 participants