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

Add SCM integration link commands #458

Merged
merged 46 commits into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9f1feb6
Added show repo link command for see repo link for an app
brandon-welsch Jul 11, 2019
a40d372
Improve errors of repo_link show command
brandon-welsch Jul 11, 2019
f70dd0e
Added create repo link command
brandon-welsch Jul 11, 2019
1be72a4
Added delete command for repo link
brandon-welsch Jul 12, 2019
f70918b
Added update command for repo link
brandon-welsch Jul 12, 2019
835f1b3
Updated repo link commands, for not use id in arg of command, app has…
brandon-welsch Jul 12, 2019
ebd0b19
Added args in update command of repo link
brandon-welsch Jul 15, 2019
8008f91
Added message when is no options parameters in the update repo link c…
brandon-welsch Jul 15, 2019
eee51cb
Added manual deploy command for repo link
brandon-welsch Jul 15, 2019
3b9c2e5
Small fix on args
brandon-welsch Jul 15, 2019
77cb569
Fix error on compilation
brandon-welsch Jul 15, 2019
bb0e0fe
Added manual review app command for repo link
brandon-welsch Jul 17, 2019
9fc4214
Rework all commands to delete repo link id
brandon-welsch Jul 17, 2019
d1ae166
Added review apps command
brandon-welsch Jul 18, 2019
c6a9596
Uncomment region code, not used for dev
brandon-welsch Jul 18, 2019
c851e77
Update go-scalingo package
brandon-welsch Jul 18, 2019
7bc7439
Updated README.md
brandon-welsch Jul 24, 2019
07e83ea
Added options on `repo-link-create` command and added more informatio…
brandon-welsch Jul 26, 2019
a686ac6
Added check in `repo-link-create` for displaying a message if app is …
brandon-welsch Jul 26, 2019
d96213b
Fix requested changes of PR
brandon-welsch Jul 29, 2019
9a8acf9
Rework calls and removed google/uuid package
brandon-welsch Jul 30, 2019
1d8f526
Update scm integrations calls
brandon-welsch Aug 2, 2019
c7d2301
Update call of methods and replace fmt.Printf() & errgo.Mask()
brandon-welsch Aug 5, 2019
c3d4e64
Fix AuthIntegrationUUID params in repo-link-create cmd
brandon-welsch Aug 5, 2019
2c29de7
Fix SCMRepoLinkUpdate
brandon-welsch Aug 6, 2019
8087d5b
Fix issue due to master merge
EtienneM Aug 20, 2019
fbfb24c
Cmd commands are private
EtienneM Aug 20, 2019
a0443ac
Make the code more readable
EtienneM Aug 20, 2019
5a3129b
Rename package repo_link to repolink
EtienneM Aug 20, 2019
396a9e1
Better message
EtienneM Aug 20, 2019
229a32a
Use TimeFormat constant everywhere
EtienneM Aug 20, 2019
f317fa4
Better wording in various places
EtienneM Aug 20, 2019
ee1d637
Rename delete-on-close and delete-on-stale to destroy-*
EtienneM Aug 20, 2019
cb5993e
Better flags type and check for repo-link create and update
EtienneM Aug 21, 2019
fe73764
Rename scm-integrations-* commands to integrations-* and rename the i…
EtienneM Aug 21, 2019
d36e87b
Rename repo-link-* commands to integration-link-*
EtienneM Aug 21, 2019
046ec9c
Add CHANGELOG entry
EtienneM Aug 21, 2019
37e06e2
integration-link-create only takes a URL as argument
EtienneM Aug 21, 2019
901decc
No space before colon
EtienneM Aug 21, 2019
98a6b30
Better message if already linked to an integration
EtienneM Aug 21, 2019
acaa3ec
Add interactive mode to create an integration-link
EtienneM Aug 21, 2019
6fb8077
Take into account the DISABLE_INTERACTIVE variable
EtienneM Aug 21, 2019
dc3669f
Move the nice error messages treatment from cmd to scmintegrations pa…
EtienneM Aug 30, 2019
a5873fe
No need to get the repo link in order to fill the update params
EtienneM Aug 30, 2019
ae71ba6
Display integration link information in simple list instead of table
EtienneM Aug 30, 2019
b7c505d
Display interactive create if there is no flag
EtienneM Aug 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

### To be Released

* Add `scm-integrations`, `scm-integrations-create`, `scm-integrations-destroy` and `scm-integrations-import-keys` commands [#444](https://github.com/Scalingo/cli/pull/444)
* Add `integrations`, `integrations-add`, `integrations-delete` and
`integrations-import-keys` commands
[#444](https://github.com/Scalingo/cli/pull/444)
* Add `integration-link`, `integration-link-create`, `integration-link-update`,
`integration-link-delete`, `integration-link-manual-deploy`,
`integration-link-manual-review-app` commands
[#458](https://github.com/Scalingo/cli/pull/458)
* Add support for new SCM-related events [#467](https://github.com/Scalingo/cli/pull/467)
* Bugfix: Do not disconnect user if the API returns 401 [#462](https://github.com/Scalingo/cli/issues/462)
* Add duration to the deployments list [#477](https://github.com/Scalingo/cli/issues/477)
Expand Down
36 changes: 36 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ COMMANDS:
user-timeline List the events you have done on the platform
timeline List the actions related to a given app

Git:
git-setup Configure the Git remote for this application
git-show Display the Git remote URL for this application

Global:
apps List your apps
create, c Create a new app
Expand All @@ -159,6 +163,20 @@ COMMANDS:
self Get the logged in profile
whoami Get the logged in profile

Integration Link:
integration-link Show repo link linked with your app
integration-link-create Create a repo link between your scm integration and your app
integration-link-update Update the repo link linked with your app
integration-link-delete Delete repo link linked with your app
integration-link-manual-deploy Trigger a manual deployment of the specified branch
integration-link-manual-review-app Trigger a review app creation of the pull/merge request ID specified

Integrations:
EtienneM marked this conversation as resolved.
Show resolved Hide resolved
integrations List your integrations
integrations-add Link your Scalingo account with your account on a tool such as github.com
integrations-delete Unlink your Scalingo account and your account on a tool such as github.com
integrations-import-keys Import public SSH keys from integration account

Notifiers:
notifiers List your notifiers
notifiers-details Show details of your notifiers
Expand All @@ -169,26 +187,23 @@ COMMANDS:
Notifiers - Global:
notification-platforms List all notification platforms

Public SSH Keys:
keys List your SSH public keys
keys-add Add a public SSH key to deploy your apps
keys-remove Remove a public SSH key

Region migrations:
migrations-create Migrate an app to another region
migrations List all migrations linked to an app
migrations-follow Follow a running migration

Public SSH Keys:
keys List your SSH public keys
keys-add Add a public SSH key to deploy your apps
keys-remove Remove a public SSH key
Review Apps:
review-apps See review apps of parent application

Runtime Stacks:
stacks List the available runtime stacks
stacks-set Set the runtime stack of an app

SCM Integrations:
scm-integrations List your SCM integrations
scm-integrations-create Link your Scalingo account with your account on a SCM tool
scm-integrations-delete Unlink your Scalingo account and your account on a SCM tool
scm-integrations-import-keys Import public SSH keys from SCM account

GLOBAL OPTIONS:
--addon value ID of the current addon (default: "<addon_id>") [$SCALINGO_ADDON]
--app value, -a value Name of the app (default: "<name>") [$SCALINGO_APP]
Expand Down
2 changes: 1 addition & 1 deletion cmd/alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var (
Usage: "List the alerts of an application",
Description: `List all the alerts of an application:

$ scalingo -a my-app alerts
$ scalingo --app my-app alerts

# See also commands 'alerts-add', 'alerts-update' and 'alerts-remove'`,

Expand Down
23 changes: 17 additions & 6 deletions cmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package cmd
import (
"os"

"github.com/Scalingo/go-scalingo/debug"

"github.com/urfave/cli"

"github.com/Scalingo/cli/config"
"github.com/Scalingo/cli/session"
"github.com/Scalingo/go-scalingo"
"github.com/Scalingo/go-scalingo/debug"
)

type AppCommands struct {
Expand Down Expand Up @@ -153,6 +154,17 @@ var (
AddonsRemoveCommand,
AddonsUpgradeCommand,

// Integration Link
integrationLinkShowCommand,
integrationLinkCreateCommand,
integrationLinkUpdateCommand,
integrationLinkDeleteCommand,
integrationLinkManualDeployCommand,
integrationLinkManualReviewAppCommand,

// Review Apps
reviewAppsShowCommand,

// Notifiers
NotifiersListCommand,
NotifiersDetailsCommand,
Expand Down Expand Up @@ -214,11 +226,10 @@ var (
AddSSHKeyCommand,
RemoveSSHKeyCommand,

// SCM Integrations
scmIntegrationsListCommand,
scmIntegrationsCreateCommand,
scmIntegrationsDeleteCommand,
scmIntegrationsImportKeysCommand,
integrationsListCommand,
integrationsAddCommand,
integrationsDeleteCommand,
integrationsImportKeysCommand,

// Sessions
LoginCommand,
Expand Down
Loading