-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_config.toml
executable file
·66 lines (50 loc) · 2.61 KB
/
example_config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Issue Porter Config File
#
# This config file controls how issues are ported from a GitLab instance
# to GitHub. This config file also functions as documentation of how the
# mapping between these two data models is achieved. If you are not familiar
# with the TOML format, see https://en.wikipedia.org/wiki/TOML .
# USAGE
#
# Create a copy of this config file called "config.toml",
# edit it, and then run `python3.12 src/main.py`.
# See the following configuration items for technical details
[gitlab]
# Gitlab access token. Be very careful! Generate a token just for using this tool.
# This is effectively a password, stored here in this config file in plain text.
# See https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
access_token = "Secret GitLab Token"
# Browser session token
# Use the inspect tool in a browser, open the network tab,
# head to gitlab and inspect the cookies for a request to Gitlab,
# you'll find a session token there. As with the access token, DO NOT SHARE IT
session_cookie = "Secret Browser session token"
# Domain to access the gitlab server. Many people run their own.
domain = "gitlab.example.com"
# GitLab Project Id, can be found next to name on project page in the web interface.
project = 123456
# Only issues with this label will be transferred.
# If empty all issues will be transferred.
transfer_label = "Transfer to GitHub"
# Transfer closed issues?
transfer_closed = false
[github]
# Github access token. Be extra careful! Generate a token just for using this tool.
# This is effectively a password, stored here in this config file in plain text.
# See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
access_token = "Secret GitHub Token"
# Target user and project to port the issues to.
project = "user/destination"
# Branch where files will be pushed to
branch = "main"
# Label which will be applied to any issue that gets transferred
ported_issue_label = "Transferred from GitLab"
# Repository to store additional data in
storage_repo = "user/destination"
# TECHNICAL DETAILS
# The way the program works is it first runs through gitlab pulling in all the issues.
# It skips issues if they don't have the [gitlab.label] label.
# These then get mapped straight over to github, where we import them, only appending a link to the old issue.
# We then do a second pass, editing each issue to update links and strip the link back. Unknown gitlab links are replaced with "[INTERNAL LINK REMOVED]"
# You can still access the old issue because github keeps track of issues history.
# All additional issues are ported straight over 1:1