Class: CodeshipMigrateToGithubApp::CLI
- Inherits:
-
Thor
- Object
- Thor
- CodeshipMigrateToGithubApp::CLI
- Defined in:
- lib/codeship_migrate_to_github_app/cli.rb
Constant Summary collapse
- CODESHIP_JSON_HEADER =
"application/json"- GITHUB_JSON_HEADER =
"application/vnd.github.v3+json"- GITHUB_INSTALLATIONS_PREVIEW_HEADER =
"application/vnd.github.v3+json, application/vnd.github.machine-man-preview+json"- CODESHIP_AUTH_URL =
"https://api.codeship.com/v2/auth"- GITHUB_ORGS_URL =
"https://api.github.com/user/orgs"- CODESHIP_MIGRATION_INFO_URL =
"https://api.codeship.com/v2/internal/github_app_migration"- GITHUB_INSTALL_URL =
"https://api.github.com/user/installations/{installation_id}/repositories/{repository_id}"- GITHUB_LIST_HOOKS_URL =
"https://api.github.com/repos/{owner}/{repo}/hooks"- GITHUB_DELETE_HOOK_URL =
"https://api.github.com/repos/{owner}/{repo}/hooks/{hook_id}"
Instance Attribute Summary collapse
-
#codeship_migration_info ⇒ Object
Returns the value of attribute codeship_migration_info.
-
#codeship_token ⇒ Object
Returns the value of attribute codeship_token.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#github_org ⇒ Object
Returns the value of attribute github_org.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#codeship_migration_info ⇒ Object
Returns the value of attribute codeship_migration_info.
20 21 22 |
# File 'lib/codeship_migrate_to_github_app/cli.rb', line 20 def codeship_migration_info @codeship_migration_info end |
#codeship_token ⇒ Object
Returns the value of attribute codeship_token.
20 21 22 |
# File 'lib/codeship_migrate_to_github_app/cli.rb', line 20 def codeship_token @codeship_token end |
#errors ⇒ Object
Returns the value of attribute errors.
20 21 22 |
# File 'lib/codeship_migrate_to_github_app/cli.rb', line 20 def errors @errors end |
#github_org ⇒ Object
Returns the value of attribute github_org.
20 21 22 |
# File 'lib/codeship_migrate_to_github_app/cli.rb', line 20 def github_org @github_org end |
Class Method Details
.exit_on_failure? ⇒ Boolean
22 23 24 |
# File 'lib/codeship_migrate_to_github_app/cli.rb', line 22 def self.exit_on_failure? true end |
Instance Method Details
#start ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/codeship_migrate_to_github_app/cli.rb', line 34 def start setup validate_github_credentials([:github_token]) fetch_codeship_token([:codeship_user], [:codeship_pass]) fetch_migration_info migrate report end |