- 10 May, 2021 1 commit
-
-
Kevin Morris authored
This option allows a user to produce the username conversions that would have occurred during a particular import. Key: Flyspray Username Value: GitLab Username A value can also be `null`, indicating that there was no Gitlab account found. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 07 May, 2021 39 commits
-
-
Kevin Morris authored
Gitlab tokens can start with '-', and this completely breaks argparse. To workaround this issue, $GITLAB_TOKEN can be used to set the default --token value of `gitlab.py`, which can safely communicate strings starting with '-'. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This caused a fatal exception, of course, because we aren't even indexing the same way. The indexes in the task list are a result of the results from a database fetch. The index we were looking for was a task id. Just look at the task that we're focused on for the loop's iteration instead of trying to re-index... Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
In regards to #29 . Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
There was a bug which caused us to attempt to use an empty record that was retrieved when we attempted to look up a gitlab user via the username mappings. This change detects this, also fix back-references in the closure comment. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Added argument `--username-mapping`. Argument: `--username-mapping USERNAME_MAPPING` Help: `path to json mapping of Flyspray to Gitlab usernames` Additionally, added short `-f` flag for `--dump-file`. See `examples/username_mappings.json`. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Some slight improvements to code here. Additionally, simplify some dict.get calls to use defaults, further improving the code. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Unfortunately, Gitlab currently has a bug located at https://gitlab.com/gitlab-org/gitlab/-/issues/271168 which does not allow us to POST a type of 'is_blocked_by'. We are actively working toward a solution for this. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
In the case an assignee is not a valid Gitlab user, we include their back-referenced user in the issue Flyspray table. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
In the case where the posting user does not have a Gitlab account, we will fallback to the token user. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This adds support for private tasks on Flyspray to be migrated over to Gitlab as confidential tasks. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Additionally, setup a notification rollback, use it and extend rollback + allow restore to be globally used with args and its own restoration memo, populated through promote. ...Restore global to_restore and to_remove structures. We need them to make things a bit simpler for restoration. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
* rollback(args) has been changed to DELETE each target issue. Now, when the user issues a 'q' action on error, a rollback will be performed. Additionally, any exception will trigger the same path, so issuing CTRL+C or CTRL+D will also trigger a rollback. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
get_user_if_missing is get_user; replaced it. user_exists is only used in one place, replace it with get_user. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
We need to make sure we cast our datetime object as UTC before generating an isoformat from it. This was generating incorrect times based on the runner's timezone. Additionally, provide "updated_at" with the close action. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
For sanity. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
With it, promote task and comment creators while posting to set 'created_at' to the correct datetime. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
See `--help`. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This change adds support for 'created_at' to be properly set in Gitlab's issues and notes. This requires that the user creating the issue or note is of owner status in the group that contains the project. This commit does still allow for non-group project migrations, resorting to the old behavior (including datetime as small text). Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
`--id-mapping-output` allows the user to save a JSON mapping of Flyspray task ids to Gitlab issue URLs found or generated by the import script. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
New parameter '--keep-ids' will instruct the script to post issues to gitlab with the same task id of the originating flyspray task. + Additionally, due to an overuse of ifs it was necessary to move the http exception logic to its own function. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Check to see if an issue already exists. If it does, skip the import. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Instead of collecting users by fetching lists via /users, we now search for each user on-demand and store them in a memo. This removes the need for paging through the users API. In regards to #12 Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This was still backreferencing to the task's creator. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
In regards to #10 Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This new parameter allows a user to specify a project id. This can be good for smaller runs or to promote more distributed runs. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Gitlab API has a 'sudo' feature to masquerade as users. Now, we'll lower case both the input and gitlab usernames we find, and attempt to match Gitlab users with the same usernames of originating posters (tasks, comments). If the user cannot be found on Gitlab, we'll fallback to providing an annotation about them and optionally a link to their user page when provided with an --upstream. + Fixed ordering bug for issue comments. GitLab ignores the 'created_at' field in certain circumstances, so we order them ourselves and supply a small annotation of the date that the comments were added. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-