-
-
Notifications
You must be signed in to change notification settings - Fork 20
feat(config): Automatically detect GitHub config when missing #208
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
Changes from all commits
4966757
1a21c66
f100c61
c91c48b
95d22e6
2ca891e
6a96e17
a5aea30
c3cd9d0
66674a5
cca0831
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import { logger } from '../logger'; | ||
| import { TargetConfig } from '../schemas/project_config'; | ||
| import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; | ||
| import { FilterOptions } from '../stores/zeus'; | ||
| import { stringToRegexp } from '../utils/filters'; | ||
| import { | ||
|
|
@@ -20,13 +20,17 @@ export class BaseTarget { | |
| public readonly config: TargetConfig; | ||
| /** Artifact filtering options for the target */ | ||
| public readonly filterOptions: FilterOptions; | ||
| /** Github repo configuration */ | ||
| public readonly githubRepo: GithubGlobalConfig; | ||
|
|
||
| public constructor( | ||
| config: TargetConfig, | ||
| artifactProvider: BaseArtifactProvider | ||
| artifactProvider: BaseArtifactProvider, | ||
| githubRepo: GithubGlobalConfig | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we default this to null/undefined to avoid having to modify every target, since most targets don't need this?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a fan of that as then we need to do non-null checks down the line. This will especially be pronounced in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we? Why would we need to check for null if the only targets that use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if they have it in the constructor, the type system will force us to make sure it is not null. We may be able to overcome this so I'll look into that later. |
||
| ) { | ||
| this.artifactProvider = artifactProvider; | ||
| this.config = config; | ||
| this.githubRepo = githubRepo; | ||
| this.filterOptions = {}; | ||
| if (this.config.includeNames) { | ||
| this.filterOptions.includeNames = stringToRegexp( | ||
|
|
@@ -46,7 +50,11 @@ export class BaseTarget { | |
| * @param version New version to be released | ||
| * @param revision Git commit SHA to be published | ||
| */ | ||
| public async publish(_version: string, _revision: string): Promise<void> { | ||
| public async publish( | ||
| _version: string, | ||
|
|
||
| _revision: string | ||
| ): Promise<void> { | ||
| throw new Error('Not implemented'); | ||
| return; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.