-
Notifications
You must be signed in to change notification settings - Fork 63
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 examples & enums #778
Fix examples & enums #778
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would need to make a pass, remove es-lint related stuff and ignore autogen sdk code for formatter to get a more usable diff
eslint.config.mjs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use biomejs as standard and had removed eslint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt add anything, i just migrated the existing config that already existed to one that didnt break.
sdk/src/core/ApiError.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your formatter run on the autogen code as well, making the code diff hard to see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not auto formatting anything in the SDK. This is what happens if you pull the repo, and run generate:sdk
. No changes.
}); | ||
it("with leading wildcard", () => { | ||
expect(sanitizeOrigin("*.foobar.com")).toEqual(RegExp(".*.foobar.com")); | ||
expect(sanitizeOrigin("*.foobar.com")).toEqual(/.*.foobar.com/); |
Check failure
Code scanning / CodeQL
Incomplete regular expression for hostnames High test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 1 month ago
To fix the problem, we need to escape the .
character in the regular expression to ensure it matches only literal dots and not any character. This can be done by replacing .*.foobar.com
with .*\.foobar\.com
. This change ensures that the regex will only match subdomains of foobar.com
and not any other unintended domains.
-
Copy modified line R9
@@ -8,3 +8,3 @@ | ||
it("with leading wildcard", () => { | ||
expect(sanitizeOrigin("*.foobar.com")).toEqual(/.*.foobar.com/); | ||
expect(sanitizeOrigin("*.foobar.com")).toEqual(/.*\.foobar\.com/); | ||
}); |
This PR is stale because it has been open for 7 days with no activity. Remove stale label or comment or this PR will be closed in 3 days. |
I'm pulling pieces from this PR and merging them into main. I won't reopen this unless you want to rebase it (probably more effort than it's worth). |
Changes
How this PR will be tested
Output
(Example: Screenshot/GIF for UI changes, cURL output for API changes)
PR-Codex overview
This PR primarily focuses on code cleanup and refactoring, improving error handling, updating comments, and enhancing type definitions across various services and routes. It also includes modifications to schemas and responses to ensure better clarity and consistency.
Detailed summary
.idea
and JetBrains-related files to.gitignore
.catch
blocks.let
declarations toconst
where applicable for better immutability.getAll()
tolist()
).testWebhook
method inWebhooksService
for testing webhook functionality.