-
Notifications
You must be signed in to change notification settings - Fork 916
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
Add precommit hook to validate i18n #8423
Conversation
Signed-off-by: Miki <[email protected]>
❌ Invalid PrefixInvalid description prefix. Found "maintenance". Expected "breaking", "deprecate", "feat", "fix", "infra", "doc", "chore", "refactor", "security", "skip", or "test". |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8423 +/- ##
==========================================
- Coverage 60.93% 60.93% -0.01%
==========================================
Files 3760 3760
Lines 89310 89313 +3
Branches 13970 13970
==========================================
Hits 54423 54423
- Misses 31492 31495 +3
Partials 3395 3395
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Miki <[email protected]>
files: string[], | ||
targetMap: Map<string, { message: string }>, | ||
config: I18nConfig, | ||
reporter: any |
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.
Is this ErrorReporter | FailReport
?
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.
This is code I just copied from another part of i18n which uses any
because different things can use it (I think). I don't think anyone other that FailReport
would get here but lemme deal with that later. Thanks for this.
@@ -0,0 +1,147 @@ | |||
/* |
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.
A little bit weird why we use the large license header in a new file.
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.
code is copied from a file that has other license.
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-8423-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 520313988c02323f9190cd93ccaa8a632744d358
# Push it to GitHub
git push --set-upstream origin backport/backport-8423-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x Then, create a pull request where the |
* Add precommit hook to validate i18n Signed-off-by: Miki <[email protected]> * Changeset file for PR opensearch-project#8423 created/updated --------- Signed-off-by: Miki <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 5203139) Signed-off-by: Miki <[email protected]>
* Add precommit hook to validate i18n * Changeset file for PR #8423 created/updated --------- (cherry picked from commit 5203139) Signed-off-by: Miki <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
Add precommit hook to validate i18n
Changelog
Check List
yarn test:jest
yarn test:jest_integration