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

Fix: Allow using double quotes for templates in Slack notifications #4555

Merged
merged 1 commit into from Jan 19, 2024

Conversation

jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Jan 18, 2024

As noted in #4556, when we're using a double quote, for use with a
template variable or function, we receive a template parse error as the
value needs to be unquoted.

This provides a slightly hacky solution which is to unquote any quoted
quotes.

Closes #4556.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 18, 2024
As noted in goreleaser#4556, when we're using a double quote, for use with a
template variable or function, we receive a template parse error as the
value needs to be unquoted.

This provides a slightly hacky solution which is to unquote any quoted
quotes.

Closes goreleaser#4556.
@jamietanna jamietanna changed the title Fix: double quotes in Slack notifications break templates Fix: Allow using double quotes for templates in Slack notifications Jan 18, 2024
@jamietanna jamietanna marked this pull request as ready for review January 18, 2024 10:26
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5d44ed1) 83.75% compared to head (d195133) 83.86%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4555      +/-   ##
==========================================
+ Coverage   83.75%   83.86%   +0.11%     
==========================================
  Files         135      135              
  Lines       12919    12923       +4     
==========================================
+ Hits        10820    10838      +18     
+ Misses       1671     1656      -15     
- Partials      428      429       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caarlos0 caarlos0 merged commit 2a71473 into goreleaser:main Jan 19, 2024
11 checks passed
@caarlos0
Copy link
Member

nice, thank you!

@github-actions github-actions bot added this to the v2.0.0 milestone Jan 19, 2024
@jamietanna jamietanna deleted the defect/quoted-slack branch January 19, 2024 13:57
@jamietanna
Copy link
Contributor Author

Thanks very much 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a double quote into a Slack notification string results in a template error
2 participants