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

Error in composer-lock diff test when PR description contains a backslash "\" before open bracket “[“, open parenthesis “(“ or underscore "_". #241

Closed
leonel-lullabot opened this issue Aug 8, 2023 · 1 comment · Fixed by #579
Assignees
Labels
bug Something isn't working client affected

Comments

@leonel-lullabot
Copy link
Collaborator

leonel-lullabot commented Aug 8, 2023

The Composer-Lock-Diff test has problems related to the description of some Pull Requests when there is a backslash “\“ before open bracket “[“, open parenthesis “(“ or underscore "_". I leave a screenshot of the PR #1450 description as an example.

image

When the Composer-Lock-Diff test runs curl, it returns \\[unicode-bom] and \\[ESLINT_USE_FLAT_CONFIG]

curl -f \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer  ${{ secrets.GITHUB_TOKEN }}" \
  https://api.github.com/repos/${{ github.repository }}/pulls/$DRAINPIPE_PR_NUMBER | jq '. | {body}' > pull_request.json
"body": "[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)\r\n\r\nThis PR contains the following updates:\r\n\r\n| Package | Change | Age | Adoption | Passing | Confidence |\r\n|---|---|---|---|---|---|\r\n| [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) | [`^8.10.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/eslint-config-prettier/8.10.0/9.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-config-prettier/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-config-prettier/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-config-prettier/8.10.0/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-config-prettier/8.10.0/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |\r\n\r\n---\r\n\r\n### Release Notes\r\n\r\n<details>\r\n<summary>prettier/eslint-config-prettier (eslint-config-prettier)</summary>\r\n\r\n### [`v9.0.0`](https://github.com/prettier/eslint-config-prettier/blob/HEAD/CHANGELOG.md#Version-900-2023-08-05)\r\n\r\n[Compare Source](https://github.com/prettier/eslint-config-prettier/compare/v8.10.0...v9.0.0)\r\n\r\n-   Added: The CLI helper tool now works with eslint.config.js (flat config). Just like ESLint itself, the CLI tool automatically first tries eslint.config.js and then eslintrc, and you can force which one to use by setting the \\[ESLINT_USE_FLAT_CONFIG] environment variable. Note that the *config* of eslint-config-prettier has always been compatible with eslint.config.js (flat config) – it was just the CLI tool that needed updating. On top of that, the docs have been updated to mention how to use both eslint.config.js (flat config) and eslintrc, and the tests now test both config systems.\r\n-   Changed: \\[unicode-bom] is no longer turned off. Prettier preserves the BOM if you have one, and does not add one if missing. It was wrong of eslint-config-prettier to disable that rule. If you get ESLint errors after upgrading, either add `\"unicode-bom\": \"off\"` to your config to disable it again, or run ESLint with `--fix` to fix all files according to the rule (add or remove BOM). Thanks to Nicolas Stepien ([@&#8203;nstepien](https://github.com/nstepien))!\r\n</details>\r\n\r\n\r\n---\r\n\r\n### Configuration\r\n\r\n📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).\r\n\r\n🚦 **Automerge**: Enabled.\r\n\r\n♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.\r\n\r\n🔕 **Ignore**: Close this PR and you won't be reminded about this update again.\r\n\r\n---\r\n\r\n - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box\r\n\r\n---\r\n\r\nThis PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/IowaWeb/iowadt).\r\n<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->\r\n",

Removing that backslash from the PR description and re-running the Composer-Lock-Diff test it passes.

@leonel-lullabot leonel-lullabot changed the title Error in composer-lock diff test when PR description contains a backslash "\" before open bracket “[“ or open parenthesis “(“. Error in composer-lock diff test when PR description contains a backslash "\" before open bracket “[“, open parenthesis “(“ or underscore "_". Aug 14, 2023
@deviantintegral deviantintegral added bug Something isn't working client affected labels Feb 19, 2024
@deviantintegral
Copy link
Member

See also: #332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client affected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants