-
Notifications
You must be signed in to change notification settings - Fork 91
fix: ci fails on prs from external forks #1030
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
Merged
MantisClone
merged 11 commits into
master
from
mantisclone/dw-67/ci-fails-on-prs-from-ext
Jan 2, 2023
Merged
fix: ci fails on prs from external forks #1030
MantisClone
merged 11 commits into
master
from
mantisclone/dw-67/ci-fails-on-prs-from-ext
Jan 2, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Previous solution assumed we used Mocha, but we're using Jest
marcohefti
added a commit
to marcohefti/requestNetwork
that referenced
this pull request
Dec 25, 2022
This commit applies the changes made to the utils package to the rest of the monorepo. The changes include replacing the default export with named exports and enforcing the no-default-export ESLint rule. NOTE: Not all changes could be tested (RequestNetwork#1029, RequestNetwork#1030, RequestNetwork#1031)
yomarion
approved these changes
Jan 2, 2023
Member
Author
|
@benjlevesque I've updated the PR description based on our discussion in Slack. If you're okay with this solution, can you please approve it? |
benjlevesque
approved these changes
Jan 2, 2023
marcohefti
added a commit
to marcohefti/requestNetwork
that referenced
this pull request
Jan 3, 2023
This commit applies the changes made to the utils package to the rest of the monorepo. The changes include replacing the default export with named exports and enforcing the no-default-export ESLint rule. NOTE: Not all changes could be tested (RequestNetwork#1029, RequestNetwork#1030, RequestNetwork#1031)
MantisClone
added a commit
that referenced
this pull request
Jan 17, 2023
* Replace default export with named exports in utils package to enable tree shaking (fixes #1015) This change replaces the default export in the utils package with named exports, which allows for better tree shaking and smaller build sizes in user code applications. It also enforces the no-default-export ESLint rule to ensure consistent code style * running refactored files through prehook (#1015) * Apply changes to utils package to monorepo This commit applies the changes made to the utils package to the rest of the monorepo. The changes include replacing the default export with named exports and enforcing the no-default-export ESLint rule. NOTE: Not all changes could be tested (#1029, #1030, #1031) * Apply changes to utils package to payment-processor/test/payment/any-to-near.test.ts * feat: tombchain (#1024) * feat: tombchain (#1024) * running refactored files through prehook (#1015) * Apply changes to utils package to monorepo This commit applies the changes made to the utils package to the rest of the monorepo. The changes include replacing the default export with named exports and enforcing the no-default-export ESLint rule. NOTE: Not all changes could be tested (#1029, #1030, #1031) * Apply changes to utils package to payment-processor/test/payment/any-to-near.test.ts * fix circular dependency by importing from the corresponding package rather from the same package barrel file * Resolves #1023: Rename ambiguous functions for clarity As discussed with @alexandre-abrioux and @benjlevesque, many of the functions in the utils module have been refactored and need to be renamed for improved code readability. Signed-off-by: marcohefti <marco@heftiweb.ch> * Fix README, identity, and signature file updates -Removed list of utils from README to avoid staleness -Changed 'hasError' to 'identityHasError' -Changed 'sign' back to original name 'sign' -Changed 'recover' to 'recoverSigner' Addressed comments by @MantisClone Signed-off-by: marcohefti <marco@heftiweb.ch> * Refactor crypto and ec-utils modules -Removed the named const from crypto-wrapper.ts and exported functions individually -Removed the named const from ec-utils.ts and exported functions individually -Renamed recover() to recoverSigner() in ec-utils.ts -Prefixed functions with 'ec' to prevent duplicate variables -Reverted normalizeData() to normalize() Signed-off-by: marcohefti <marco@heftiweb.ch> Signed-off-by: marcohefti <marco@heftiweb.ch> Co-authored-by: MantisClone <david.huntmateo@request.network> Co-authored-by: leoslr <50319677+leoslr@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1029
Description of the changes
DISABLE_API_TESTSenv var. When set, disable tests that require API keys.CIRCLE_PR_NUMBERenv var and disable API tests if found.CIRCLE_PR_NUMBERindicates that PR originates from an external fork and thus cannot access secret API keysMotivation
Why use
CIRCLE_PR_NUMBER?CIRCLE_PR_NUMBERis recommended by the Circle Blog: https://circleci.com/blog/managing-secrets-when-you-have-pull-requests-from-outside-contributors/CIRCLE_PR_NUMBERis only defined on PRs from external forks and shouldn't have any effect on PRs from internal branches.CIRCLE_PR_NUMBERis just one of 3 Circle CI environment variables that exist only on PRs from external forks. The other two areCIRCLE_PR_REPONAMEandCIRCLE_PR_USERNAME.Source: https://circleci.com/docs/variables/#built-in-environment-variables