-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from humanitec/configurable-automation-rule
feat: configurable automation rule creation
- Loading branch information
Showing
8 changed files
with
6,815 additions
and
4,251 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
import {apiConfig, PublicApi} from '@humanitec/autogen'; | ||
import {APIConfig, apiConfig, PublicApi} from '@humanitec/autogen'; | ||
|
||
export type HumanitecClient = PublicApi | ||
|
||
export const createApiClient = (basePath: string, token: string): PublicApi => { | ||
const config = apiConfig({ | ||
const clientConfig: APIConfig = { | ||
token, | ||
apiHost: `https://${basePath}`, | ||
internalApp: 'preview-envs-action/latest', | ||
}); | ||
}; | ||
|
||
if (basePath) { | ||
clientConfig.apiHost = `https://${basePath}`; | ||
} | ||
|
||
const config = apiConfig(clientConfig); | ||
|
||
return new PublicApi(config); | ||
}; |