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

[HOLD for payment 2023-12-07] Fix deploy blocker workflow #31846

Closed
luacmartins opened this issue Nov 24, 2023 · 8 comments
Closed

[HOLD for payment 2023-12-07] Fix deploy blocker workflow #31846

luacmartins opened this issue Nov 24, 2023 · 8 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2

Comments

@luacmartins
Copy link
Contributor

Problem

We have 2 issues in the deploy blocker workflow:

  1. The links to issues are broken, e.g. here
  2. The workflow fails when the issue title has single or double quotes.

Why is this important

Our deploy workflows needs to work

Solution

Fix it!

@codecreator28
Copy link

The root cause is because single quotes (') in the issue title are not being escaped properly when they are replaced with the corresponding HTML entities. To fix it need to escape the single quotes before replacing them with HTML entities

App/.github/workflows/deployBlocker.yml
text: '💥 We have found a New Expensify Deploy Blocker, if you have any idea which PR could be causing this, please comment in the issue: <${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>'.replace(/[&<>"'|]/g, function(m) { return {'&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#039;', '|': '&verbar;'}[m]; }),

change to -

text: '💥 We have found a New Expensify Deploy Blocker, if you have any idea which PR could be causing this, please comment in the issue: <${{ github.event.issue.html_url }}|${{ github.event.issue.title.replace("'", "&#039;") }}>'.replace(/[&<>"'|]/g, function(m) { return {'&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', '|': '&verbar;'}[m]; }),

In this updated code, the single quotes (') in the issue title are replaced with the HTML entity &#039;. This ensures that the single quotes are not interpreted as part of the HTML syntax, preventing the error.

@luacmartins
Copy link
Contributor Author

luacmartins commented Nov 27, 2023

@sukach318 thanks for the post, but we already have a PR to fix this.

@michaelssingh
Copy link

@luacmartins wait is this no longer needed? I commented here

@luacmartins
Copy link
Contributor Author

@michaelssingh that issue was closed as a dupe since we had this one that was created earlier and we also already had a PR with a fix.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 30, 2023
@melvin-bot melvin-bot bot changed the title Fix deploy blocker workflow [HOLD for payment 2023-12-07] Fix deploy blocker workflow Nov 30, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.5-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-12-07. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Dec 7, 2023
Copy link

melvin-bot bot commented Dec 12, 2023

@luacmartins Huh... This is 4 days overdue. Who can take care of this?

@luacmartins
Copy link
Contributor Author

This is done!

@melvin-bot melvin-bot bot removed the Overdue label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2
Projects
None yet
Development

No branches or pull requests

3 participants