Skip to content

Commit

Permalink
Rename to --repo-base-url
Browse files Browse the repository at this point in the history
  • Loading branch information
obarcelonap committed Dec 2, 2024
1 parent d8115cf commit 4072a38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Create a new Adobe I/O App
USAGE
$ aio app init [PATH] [-v] [--version] [--install] [-y] [--login] [-e <value> | -t <value> | --repo <value>]
[--standalone-app | | ] [-w <value> | -i <value>] [--confirm-new-workspace] [--use-jwt] [--github-pat <value> ]
[--base-url <value> ] [--linter none|basic|adobe-recommended]
[--repo-base-url <value> ] [--linter none|basic|adobe-recommended]
ARGUMENTS
PATH [default: .] Path to the app directory
Expand All @@ -527,16 +527,16 @@ FLAGS
-w, --workspace=<value> [default: Stage] Specify the Adobe Developer Console Workspace to init from, defaults to
Stage
-y, --yes Skip questions, and use all default values
--base-url=<value> When using with GitHub Enterprise Server, set to the root URL of the API. For example,
if your GitHub Enterprise Server's hostname is `github.acme-inc.com`, then set
`base-url` to `https://github.acme-inc.com/api/v3`
--[no-]confirm-new-workspace Prompt to confirm before creating a new workspace
--github-pat=<value> github personal access token to use for downloading private quickstart repos
--[no-]install [default: true] Run npm installation after files are created
--linter=<option> [default: basic] Specify the linter to use for the project
<options: none|basic|adobe-recommended>
--[no-]login Login using your Adobe ID for interacting with Adobe I/O Developer Console
--repo=<value> Init from gh quick-start repo. Expected to be of the form <owner>/<repo>/<path>
--repo-base-url=<value> When using with GitHub Enterprise Server, set to the root URL of the API. For example,
if your GitHub Enterprise Server's hostname is `github.acme-inc.com`, then set
`base-url` to `https://github.acme-inc.com/api/v3`
--standalone-app Create a stand-alone application
--use-jwt if the config has both jwt and OAuth Server to Server Credentials (while migrating),
prefer the JWT credentials
Expand Down
6 changes: 3 additions & 3 deletions src/commands/app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class InitCommand extends TemplatesCommand {
}

if (flags.repo) {
await this.withQuickstart(flags.repo, flags['github-pat'], flags['base-url'])
await this.withQuickstart(flags.repo, flags['github-pat'], flags['repo-base-url'])
} else {
// 2. prompt for templates to be installed
const templates = await this.getTemplatesForFlags(flags)
Expand Down Expand Up @@ -134,7 +134,7 @@ class InitCommand extends TemplatesCommand {

async initWithLogin (flags) {
if (flags.repo) {
await this.withQuickstart(flags.repo, flags['github-pat'], flags['base-url'])
await this.withQuickstart(flags.repo, flags['github-pat'], flags['repo-base-url'])
}
// this will trigger a login
const consoleCLI = await this.getLibConsoleCLI()
Expand Down Expand Up @@ -490,7 +490,7 @@ InitCommand.flags = {
description: 'github personal access token to use for downloading private quickstart repos',
dependsOn: ['repo']
}),
'base-url': Flags.string({
'repo-base-url': Flags.string({
description: 'When using with GitHub Enterprise Server, set to the root URL of the API. For example, if your GitHub Enterprise Server\'s hostname is `github.acme-inc.com`, then set `base-url` to `https://github.acme-inc.com/api/v3`',
dependsOn: ['repo']
}),
Expand Down
4 changes: 2 additions & 2 deletions test/commands/app/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@ describe('--no-login', () => {
expect(Octokit).toHaveBeenCalledWith(expect.objectContaining({ auth: pat }))
})

test('--repo --base-url', async () => {
test('--repo --repo-base-url', async () => {
Octokit.mockImplementation(() => ({ repos: { getContent: () => Promise.resolve({ data: [] }) } }))

const baseUrl = 'https://github.acme-inc.com/api/v3'
command.argv = ['--repo=org/repo', '--base-url', baseUrl]
command.argv = ['--repo=org/repo', '--repo-base-url', baseUrl]

await command.run()

Expand Down

0 comments on commit 4072a38

Please sign in to comment.