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

Move GitHubOrg (and GitHubConfig) out of @/config #532

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

chadwhitacre
Copy link
Member

Part of #482, after #531.

I want to see if I can move the functions from githubEventHelpers onto this class, to unfrobulate the call chains and how we pass org around.


// Config - loosely typed and ephemeral, used for collecting values found in
// Don't use '@api' here, because it's ... not loaded yet, or something?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮 What error is being thrown here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ yarn test -- src/config/loadGitHubOrgsFromEnvironment.test.ts
Error: Jest: Got error running globalSetup - /Users/chadwhitacre/workbench/getsentry/eng-pipes/test/jest.glo
balSetup.ts, reason: Your application tried to access @api/github, but it isn't declared in your dependencie
s; this makes the require call ambiguous and unsound.
  
Required package: @api/github (via "@api/github/org")
Required by: /Users/chadwhitacre/workbench/getsentry/eng-pipes/src/config/

Require stack:
- /Users/chadwhitacre/workbench/getsentry/eng-pipes/src/config/loadGitHubOrgsFromEnvironment.ts
- /Users/chadwhitacre/workbench/getsentry/eng-pipes/src/config/index.ts
- /Users/chadwhitacre/workbench/getsentry/eng-pipes/src/knexfile.ts
- /Users/chadwhitacre/workbench/getsentry/eng-pipes/test/jest.globalSetup.ts
- 

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff --git a/src/config/loadGitHubOrgsFromEnvironment.ts b/src/config/loadGitHubOrgsFromEnvironment.ts
index 6a51857..6014d26 100644
--- a/src/config/loadGitHubOrgsFromEnvironment.ts
+++ b/src/config/loadGitHubOrgsFromEnvironment.ts
@@ -1,7 +1,7 @@
 import { GitHubOrgConfig } from '@/types';
 
 // Don't use '@api' here, because it's ... not loaded yet, or something?
-import { GitHubOrg } from '../api/github/org';
+import { GitHubOrg } from '@api/github/org';
 
 // Configs - loosely typed and ephemeral, used for collecting values found in
 // the environment. We check for missing values using this but not for types,

@chadwhitacre chadwhitacre force-pushed the cwlw/app-org branch 2 times, most recently from cd7b1a1 to e69dc6f Compare July 21, 2023 21:05
@chadwhitacre chadwhitacre force-pushed the cwlw/factor-out-org branch from a635bed to aa44c03 Compare July 21, 2023 21:06
Base automatically changed from cwlw/app-org to main July 21, 2023 21:07
@chadwhitacre chadwhitacre force-pushed the cwlw/factor-out-org branch from aa44c03 to 17e4d89 Compare July 21, 2023 21:12
@chadwhitacre chadwhitacre enabled auto-merge (squash) July 21, 2023 21:12
@chadwhitacre chadwhitacre merged commit ccc5cca into main Jul 21, 2023
@chadwhitacre chadwhitacre deleted the cwlw/factor-out-org branch July 21, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants