Michael Muré
87b97ca4b2
bridges: more refactor and cleanup
2020-02-15 13:45:14 +01:00
Michael Muré
432a816dde
Merge remote-tracking branch 'origin/master' into cheshirekow-jira
2020-02-15 03:07:45 +01:00
Michael Muré
fe3d5c95e4
bridges: massive refactor
...
- automatic flag validation and warning
- generalized prompt
- cleanups
2020-02-15 02:55:19 +01:00
Michael Muré
e9aff2a2a1
Merge remote-tracking branch 'origin/master' into cheshirekow-jira
2020-02-14 22:56:59 +01:00
Michael Muré
34083de0df
auth: refactor and introduce Login and LoginPassword, salt IDs
2020-02-12 23:37:57 +01:00
Michael Muré
bd7b50bc86
github/gitlab: many fixes and improvments at the config step
2020-02-10 01:22:01 +01:00
Michael Muré
b2ca506210
jira: admittedly biased go styling
2020-02-09 21:08:47 +01:00
Michael Muré
2792c85b21
jira: use the new generalized prompts
2020-02-09 20:52:19 +01:00
Michael Muré
b3d3612393
Merge remote-tracking branch 'origin/master' into cheshirekow-jira
2020-02-09 20:23:38 +01:00
Michael Muré
9b1aaa032d
bridge: fix 2 uncatched errors
2020-02-08 22:08:35 +01:00
Michael Muré
bef35d4c67
bridge: hopefully fix tests
2020-02-08 22:05:13 +01:00
Michael Muré
a335725cc5
bridge: fix wrong error used
2020-02-08 22:04:51 +01:00
Michael Muré
8773929f96
github: make sure to have a name
2020-02-08 22:04:25 +01:00
Michael Muré
2e7ac569ad
fix tests ?
2020-02-08 17:35:35 +01:00
Michael Muré
646fd681ff
it compiles \o/
2020-02-08 17:19:57 +01:00
Michael Muré
f515b9a129
gitlab also compile
2020-02-08 17:19:57 +01:00
Michael Muré
74e9114410
more more wip
2020-02-08 17:19:57 +01:00
Michael Muré
8da522d97a
wip
2020-02-08 17:18:30 +01:00
Michael Muré
b950c2580d
more wip
2020-02-08 17:18:30 +01:00
Michael Muré
ae2f942ef9
more wip
2020-02-08 17:18:28 +01:00
Michael Muré
26f0152384
WIP
2020-02-08 17:18:28 +01:00
Michael Muré
db893494bb
input: better reusable prompt functions
2020-02-08 17:18:27 +01:00
Michael Muré
ee48aef489
github: warning when the comment to be edited is missing instead of failing
...
fix #286
2020-01-04 13:11:29 +01:00
Josh Bialkowski
a785bcdad6
codereview #6 : don't fail one warning
...
* presence of an error in the import event doesn't indicate failure
2020-01-04 13:04:21 +01:00
Josh Bialkowski
f15206e7b1
* Fix git config reader can't read values with spaces
...
* Add NewImportWarning for things that aren't exactly errors.
Use this for unhandled changelog events.
* Add NewExportWarning for things that aren't exactly errors.
Use this for un-exportable status changes.
2020-01-04 13:04:15 +01:00
Michael Muré
86b114ae7e
gitlab: proper token generation URL with custom base URL
2020-01-03 13:53:59 +01:00
Michael Muré
d2ed6747e5
gitlab: fix edit not being pushed with baseUrl
...
fix #284
2020-01-03 13:52:03 +01:00
Michael Muré
1bcba473fb
Merge pull request #280 from MichaelMure/bridge-gitlab
...
bridge/gitlab: add base url configuration
2019-12-27 12:12:01 +01:00
Amine
c769348c75
bridge/gitlab/config.go printing typo
...
Co-Authored-By: Michael Muré <batolettre@gmail.com>
2019-12-27 03:29:53 +01:00
amine
5cffb5d114
bridge/gitlab: add missing baseUrl prompt and options
...
bridge/gitlab: fix api calls with self hosted Gitlab instances
2019-12-26 20:16:18 +01:00
Michael Muré
864d3ed335
bridge: allow to configure and pull without having set a user first
...
- init() only the importer or exporter as required
- assign a "default user" user Id to credentials at creation if no user has been set
- "bridge auth": also display the user
- "bridge auth show": adapt to a potential "default user" user Id
- "bridge configure": allow to run without a user set
- "bridge pull": allow to run without a user set
- "user adopt": replace "default user" by the actual user id when run
2019-12-25 23:25:39 +01:00
Josh Bialkowski
dca85b309a
repair after rebase
2019-12-18 12:18:47 -08:00
Josh Bialkowski
3384d1b26b
codereview #6 : don't fail one warning
...
* presence of an error in the import event doesn't indicate failure
2019-12-18 07:42:16 -08:00
Josh Bialkowski
4e64c834e2
codereview #5 : reverse-map and ImportWarning
...
* Fix git config reader can't read values with spaces
* Add bug-id-revmap config option for the reverse map, and use this
in the importer
* Add NewImportWarning for things that aren't exactly errors.
Use this for unhandled changelog events.
* Add NewExportWarning for things that aren't exactly errors.
Use this for un-exportable status changes.
* Strip newlines from titles on import
2019-12-18 07:42:16 -08:00
Josh Bialkowski
98bd372e60
codereview #4 : fixes from testing
...
* don't prefix imported title's with jira ID
* fix import new comment due to wrong variable name
* fix double import of comment edition due to improper err check
* fix JIRA cloud paginated changelog has a different JSON
field then the embedded changelog in the JIRA server issue
object
* fix splitting label strings yielded an empty string as a label
value
2019-12-18 07:42:16 -08:00
Josh Bialkowski
a59aaebc7e
codreview #3 : two credential types, more fixes
...
* Support both token and session credential types
* use getTimeDervedID in export.go
* keyOrigin -> core.KeyOrigin
* fix one indentation
* remove project key from operation metadata
* fix missing credentials codepath if not using sidecar
2019-12-18 07:42:16 -08:00
Josh Bialkowski
cd889572f7
codereview #2 : some cleanup, correct use of nothing-events
...
* return error, don't panic
* skipping status export is an error
* use switch in config.go
* move PromptPassword to input
* move client construction into getIdentityClient
* use non-pointer context throughout client since it is an interface
* remove some TODOs
* don't emit multiple nothing-events, just one per bug only if nothing
happened.
* rename EditBody to EditCreateComment
* add configuration notes about additional values
* store bug id map in a dictionary in the config
* some fixes from testing
2019-12-18 07:42:16 -08:00
Josh Bialkowski
7657a38ff2
codereview #1 : clean lint from golangcibot
2019-12-18 07:42:16 -08:00
Josh Bialkowski
eff830bdcb
Implement jira bridge
2019-12-18 07:42:13 -08:00
amine
f6b4830c0b
bridge/gitlab: support self-hosted GitLab instance
2019-12-10 21:05:55 +01:00
Michael Muré
f1ed857cbd
Merge pull request #271 from MichaelMure/bridge-credentials
...
bridge: huge refactor to accept multiple kind of credentials
2019-12-10 00:42:23 +01:00
amine
58c0e5aac9
auth: Correctly cast configs[configKeyKind]
2019-12-09 17:16:44 +01:00
Michael Muré
4c6d33e48e
type the CredentialKind values
...
Co-Authored-By: Amine <hilalyamine@gmail.com>
2019-12-09 16:43:30 +01:00
Michael Muré
8f7f89561b
bridge: fix incorrect last import time on context cancel
2019-12-09 01:03:37 +01:00
Michael Muré
b92adfcb5f
bridge: huge refactor to accept multiple kind of credentials
2019-12-08 21:28:27 +01:00
Michael Muré
1a1e313f30
bridge: move export event handling to the CLI
2019-11-26 20:46:00 +01:00
Michael Muré
4f856d6f78
gitlab: configurator cleanup
2019-11-26 20:45:32 +01:00
Michael Muré
afe69d0c93
github: tiny cleanups of the configurator
2019-11-26 19:46:50 +01:00
amine
7cb772095e
bridge: trim inputs during bridge configuration
2019-11-25 15:08:48 +01:00
amine
06abb5a531
bridge/gitlab: add gitlab bridge configuration
2019-11-24 18:04:48 +01:00
amine
da2d7970cd
bridge/core: add LoadTokensWithTarget and LoadOrCreateToken functions
...
bridge/github: global fixes
2019-11-24 14:38:44 +01:00
amine
09db1cda71
commands: add bridge configure --token-id flag
2019-11-23 19:26:27 +01:00
amine
014e754fcd
bridge/github: use core.ConfigKeyToken instead of keyToken
2019-11-23 19:20:55 +01:00
amine
b1d0f48f67
bridge/github: configuration with global configs
2019-11-23 19:20:32 +01:00
amine
bf7583862d
bridge/core: load token value in ensureInit
...
bridge/core: add more token functionalities
2019-11-23 19:20:19 +01:00
Michael Muré
6345895a3d
Merge pull request #258 from MichaelMure/fixes
...
Bridges fixes
2019-11-19 21:31:29 +01:00
Michael Muré
76b612936d
bridge: use the target as well in the token ID
2019-11-19 21:23:03 +01:00
Michael Muré
5054b8dbdc
github: sort project candidate in the interactive wizard
2019-11-19 21:12:10 +01:00
amine
d6d5978b6d
bridge/launchpad: importer correctly emit NothingEvent
2019-11-19 20:33:20 +01:00
amine
967f19a30f
bridge/gitlab: importer and exporter correctly emit NothingEvents
2019-11-19 20:09:29 +01:00
amine
87244d3c8d
bridge/github: export correctly emit nothing events
2019-11-19 20:04:40 +01:00
amine
8b5685bb99
bridge/github: importer corectly emit events
2019-11-19 19:54:07 +01:00
Michael Muré
e01cefff98
Merge pull request #247 from MichaelMure/bridge-origin
...
bridge: move keyOrigin to core package
2019-11-19 19:25:43 +01:00
amine
8ffe2a9b03
bridge/launchpad: add missing metadata
...
bridge: use a specific key for origin metadata
2019-11-19 19:16:16 +01:00
Michael Muré
67c82f4a2d
bridge/core: document import/export events
2019-11-19 19:13:15 +01:00
amine
e3e37fd79e
bridge/github: fix iterator regression
2019-11-11 22:19:57 +01:00
Michael Muré
c1f33db2f2
github: follow API changes
...
https://developer.github.com/v4/changelog/2019-06-04-schema-changes/
2019-11-11 20:26:13 +01:00
Michael Muré
f8cf3fea03
cli: add bridge token show
2019-11-10 15:50:56 +01:00
Michael Muré
e2445edcb9
bridge: various improvement on the global token PR
2019-11-10 14:53:40 +01:00
amine
45653bd31d
token: regenerate documentation and fix imports
2019-11-09 14:55:27 +01:00
amine
bbbf3c6c7f
bridge/core: store token in the global config and replace scopes with create date
2019-11-09 14:52:20 +01:00
amine
4dc7b8b06e
tokens: use entity.Id as id type
2019-11-09 13:26:52 +01:00
amine
baefa687b5
tokens: use a hash as token identifier instead of the token it self
2019-11-09 13:26:52 +01:00
Michael Muré
3984919a3d
bridge: various cleanups
2019-11-09 13:26:48 +01:00
Amine
3433fa5def
commands: use token value as identifier
2019-11-09 13:25:07 +01:00
Amine
967e168333
bridge/core: use token id instead of name
...
commands: add bridge token rm/add
commands: improve bridge token printing
2019-11-09 13:25:07 +01:00
Amine
56551b6a22
bridge/core: comment token functionalities
2019-11-09 13:24:44 +01:00
Amine
a6ce534403
bridge/core: Implement token functionalities
2019-11-09 13:13:13 +01:00
amine
bf84a789c9
bridge/github: improve iterator readability
2019-11-05 23:11:38 +01:00
amine
b1a7618428
bridge/gitlab: add missing error check in export tests
2019-11-05 21:15:21 +01:00
amine
13f98d0cc4
bridge/github: improve iterator NextTimelineItem function
2019-11-05 21:03:16 +01:00
Michael Muré
57e23c8ada
bridge: improvement on the import resume feature
2019-11-03 17:23:05 +01:00
amine
614bc5a2c5
commands: support bridge imports after a given date and resumable imports
2019-11-03 17:21:27 +01:00
Michael Muré
16bd116971
Merge pull request #234 from MichaelMure/dependabot/dep/github.com/xanzy/go-gitlab-0.21.0
...
build(deps): bump github.com/xanzy/go-gitlab from 0.20.0 to 0.21.0
2019-11-03 13:29:29 +00:00
Michael Muré
8c7c9880b1
Merge pull request #228 from ludovicm67/patch-cli-label-colors
...
Display label colors in termui
2019-11-03 13:09:55 +00:00
amine
60c6bd360f
bridge: use new repository configuration interface
...
commands/webui: use new repository configuration interface
2019-11-01 22:44:11 +01:00
amine
4666763d4d
bridge/gitlab: use gitlab.Labels pointer instead of string slice
2019-10-24 21:08:31 +02:00
ludovicm67
75004e1298
bug: rename RGBA to Color
2019-10-15 20:42:27 +02:00
Amine
ed774e4e50
bridge/gitlab: iterator use simple swap
...
bridge/gitlab: add documentation explaining why we are doing this
2019-10-13 12:57:56 +02:00
Amine
312bc58c54
bridge/gitlab: iterator now query all label events when NextLabelEvent() i called, and sort them by ID
2019-10-02 15:39:24 +02:00
Amine
8498deaa19
bridge/gitlab: fix integration tests
2019-10-01 10:53:54 +02:00
Amine Hilaly
f3d8da1075
bridge/core: add tokenStdin field to bridgeParams
...
commands: move tokenStdin handling logic to bridge.Configure
2019-09-02 09:44:00 +02:00
Amine Hilaly
46f9573444
bridge/github: move cleaners to where is called
2019-09-01 00:04:01 +02:00
Amine Hilaly
be94780315
bridge/github: recover terminal state in password prompts
...
commands: error if a token is provide but not the bridge name and target
2019-08-31 23:02:20 +02:00
Amine
65d7ce7c05
commands: enhance flag description
...
bridge/github: improve configuration logic
Co-Authored-By: Michael Muré <batolettre@gmail.com>
2019-08-31 23:02:20 +02:00
Amine Hilaly
0381400bfd
commands: read token from stdin in bridge configuration
...
bridge: improve bridge config validation
2019-08-31 23:02:20 +02:00
Amine Hilaly
c8fdaab50a
bridge/gitlab: remove gitlab url checking before export
2019-08-24 13:22:23 +02:00
Amine Hilaly
22960159e9
bridge/gitlab: exporter ignore issues imported from or exported to different projects
2019-08-23 15:16:58 +02:00
Amine Hilaly
63e7b08628
bridge/gitlab: improve exporter error handling and label change operations
2019-08-23 01:55:57 +02:00
Amine Hilaly
514dc30c20
bridge/gitlab: fix edit comment request and remove label functionalities
2019-08-19 23:56:50 +02:00
Amine Hilaly
f1be129d75
bridge/gitlab: rebase and correct exporter
2019-08-19 13:50:48 +02:00
Amine Hilaly
c7e932e5a9
bridge/gitlab: add exporter e2e tests
...
bridge/gitlab: fix export bugs and rebase
2019-08-19 10:38:09 +02:00
Amine Hilaly
f1c65a9f86
bridge/gitlab: add exporter implementation
2019-08-19 10:38:09 +02:00
Amine Hilaly
4a4e238d1f
bridge/github: add exporter test cases for label change bug
2019-08-19 00:44:35 +02:00
Amine Hilaly
d19b8e1a09
bridge/github: fix name case sensitivity in retrieving and creating labels using github graphql api
2019-08-19 00:44:33 +02:00
Amine Hilaly
df412430ab
bridge/github: improve error handling and Nothing events
...
vendor: add package golang.org/x/sync/errgroup
2019-08-18 23:50:13 +02:00
Amine Hilaly
501a931080
bridge/gthub: use errgroup.Group instead of sync.WaitGroup
2019-08-18 00:14:22 +02:00
Amine Hilaly
5ca326af83
bridge/core: add context.Context to ImportAll and ExportAll signatures
...
bridge/core: add ImportResult objects to stream import events
bridge/core: launchpad support asynchronous import
bridge/github: cancellable export and import functions
bridge/gitlab: cancellable export and import functions
commands: bridge pull/push gracefull kill
bridge/github: fix github import
bridge/github: use simple context for imports
bridge/core: name parameters in interfaces
github/core: Add EventError to export and import events types
bridge/gitlab: add context support in gitlab requests functions
bridge/gitlab: remove imported events count from importer logic
bridge/github: remove imported events count from importer logic
bridge/github: add context support in query and muration requets
bridge/github: fix bug duplicate editions after multiple calls
bridge/core: import import and export events String methods
bridge/gitlab: fix error handling in note import events
commands/bridge: Add statistics about imports and exports
bridge/gitlab: properly handle context cancellation
bridge/github: improve error handling
bridge: break iterators on context cancel or timeout
bridge: add context timeout support
bridge: improve event formating and error handling
commands: handle interrupt and switch cases
bridge/github: add export mutation timeouts
bridge: fix race condition bug in the github and gitlab importers
bridge/github: improve context error handling
2019-08-18 00:14:22 +02:00
Amine
cf960bc7a5
Merge pull request #193 from MichaelMure/immutableID
...
Future proof the operation's ID
2019-08-13 16:47:24 +02:00
Michael Muré
c809d37152
more hash-->id fixes
2019-08-13 16:23:05 +02:00
Michael Muré
99b5c58d43
finish the refactoring for the dedicated identifier type
2019-08-12 16:12:14 +02:00
Amine Hilaly
ca5e40e523
bridge/gitlab: importer handle mentions in other issue and merge requests
2019-08-11 00:08:26 +02:00
Michael Muré
a0dfc20211
github: fix bad refactor
2019-08-08 19:06:13 +02:00
Michael Muré
612a29b031
fix everything following the hash-->id change
2019-08-08 19:06:13 +02:00
Amine Hilaly
e678e81bc7
bridge/gitlab: fix bug when running import multiple times
2019-07-31 19:22:23 +02:00
Amine Hilaly
5327983b7a
bridge/gitlab: handle other notes cases
2019-07-26 16:35:38 +02:00
Michael Muré
9ecbcb1cf6
Merge pull request #179 from MichaelMure/gitlab-support
...
Add gitlab bridge configuration and importer
2019-07-23 19:50:58 +02:00
Amine Hilaly
29fdd37ce6
bridge/github: add getNewTitle tests
2019-07-23 19:49:53 +02:00
Amine Hilaly
0c8f1c3a58
bridge/gitlab: fix comment edition target hash in the import
...
bridge/gitlab: global changes, typo fixes, comments addition
2019-07-23 18:40:10 +02:00
Amine Hilaly
0329bfdf44
bridge/gitlab: change validateProjectURL signature
...
bridge/gitlab: code cleanup
2019-07-23 17:29:53 +02:00
Amine Hilaly
b82ef04452
fix index out of range panic in github configuration
2019-07-23 17:20:42 +02:00
Amine
d098a96407
bridge/gitlab: global code and comment updates
...
Co-Authored-By: Michael Muré <batolettre@gmail.com>
2019-07-23 17:18:04 +02:00
Amine Hilaly
ece2cb1262
bridge/gitlab: improve tests and errors
...
bridge/gitlab: global fixes
2019-07-23 17:18:04 +02:00
Amine Hilaly
b27647c7a0
bridge/gitlab: Fix test project path
...
bridge/gitlab: update comments
2019-07-23 17:18:04 +02:00
Amine Hilaly
b18507836c
bridge/gitlab: add gitlab client default timeout
...
bridge/gitlab: fix import bug
2019-07-23 17:18:04 +02:00
Amine Hilaly
5e2eb5000b
bridge/gitlab: remove exporter
2019-07-23 17:18:04 +02:00
Amine Hilaly
b9a5338049
bridge/gitlab: move constants to gitlab.go
2019-07-23 17:18:04 +02:00
Amine Hilaly
7726bbdbcf
bridge/gitlab: add bridge config tests
2019-07-23 17:18:04 +02:00
Amine Hilaly
ce3a2788ab
bridge/gitlab: fix note error handling bug
...
bridge/gitlab: remove unused functions
2019-07-23 17:18:04 +02:00
Amine Hilaly
05a3aec1a8
bridge/gitlab: add import unit tests
2019-07-23 17:18:04 +02:00
Amine Hilaly
76a389c93d
bridge/gitlab: make resolve error unique within the importer
2019-07-23 17:18:04 +02:00
Amine Hilaly
e012b6c622
bridge/gitlab: check notes system field
2019-07-23 17:18:04 +02:00
Amine Hilaly
ffb8d34e4f
bridge/gitlab: check identity cache in ensurePerson
2019-07-23 17:18:04 +02:00
Amine Hilaly
8b6c896369
bridge/gitlab: complete importer
2019-07-23 17:18:04 +02:00
Amine Hilaly
53f99d3b85
bridge/gitlab: add import note utilities
...
bridge/gitlab: set default capacity to 20
2019-07-23 17:18:04 +02:00
Amine Hilaly
89227f92b5
bridge/gitlab: add iterator LabelEvents
2019-07-23 17:18:04 +02:00
Amine Hilaly
b512108ac7
bridge/gitlab: fix iterator bugs and enhacements
2019-07-23 17:18:04 +02:00
Amine Hilaly
612264a00f
bridge/gitlab: fix iterator out of index bug
2019-07-23 17:18:04 +02:00
Amine Hilaly
6c02f0951d
bridge/gitlab: prompt only for user provided token
2019-07-23 17:18:04 +02:00
Amine Hilaly
aea88180d3
bridge/gitlab: add method to query all project labels
2019-07-23 17:18:04 +02:00
Amine Hilaly
5144525649
bridge/gitlab: remove request token methodes
2019-07-23 17:18:04 +02:00
Amine Hilaly
8ee136e9fc
bridge/gitlab: add issue iterator
2019-07-23 17:18:04 +02:00
Amine Hilaly
35a033c0f1
bridge/gitlab: bridge project validation
...
bridge/gitlab: token generation
2019-07-23 17:18:04 +02:00
Amine Hilaly
a1a1d4868b
bridge/gitlab: add bridge configure
2019-07-23 17:18:04 +02:00
Amine Hilaly
cfd5653508
bridge/gitlab: init exporter
2019-07-23 17:18:04 +02:00
Amine Hilaly
01c0f644b2
bridge/gitlab: init new bridge
2019-07-23 17:18:04 +02:00
Amine Hilaly
c805142f00
bridge/github: fix project visibility prompt
2019-07-22 18:14:40 +02:00
Michael Muré
dc289876c6
bridge: detect when trying to configure a bridge with a name already taken
2019-07-07 12:15:01 +02:00
Michael Muré
5b1a8cdefa
bridge: use a single KeyTarget constant for all bridges
2019-07-07 11:10:58 +02:00
Amine Hilaly
9e611ee667
[bridge/github] import: avoid retrieving ghost email in userQuery
...
request
rename userQuery to ghostQuery
2019-07-06 16:20:05 +02:00