You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/07/13 09:17:20 UTC
[incubator-devlake-website] 03/03: feat: team feature user guide
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git
commit bd483f0161e5da948f2a3a3922b778fb1f0d52d8
Author: abeizn <zi...@merico.dev>
AuthorDate: Wed Jul 13 15:44:59 2022 +0800
feat: team feature user guide
---
docs/UserManuals/team-feature-user-guide.md | 45 ++++++++++++-----------------
1 file changed, 19 insertions(+), 26 deletions(-)
diff --git a/docs/UserManuals/team-feature-user-guide.md b/docs/UserManuals/team-feature-user-guide.md
index 2c9fb4a..07a080b 100644
--- a/docs/UserManuals/team-feature-user-guide.md
+++ b/docs/UserManuals/team-feature-user-guide.md
@@ -9,28 +9,24 @@ This is a brief step-by-step guide to using the team feature.
Notes:
1. Please convert /xxxpath/*.csv to the absolute path of the csv file you want to upload.
-2 Please replace the 127.0.0.1:8080 in the text with the actual ip and port.
+2. Please replace the 127.0.0.1:8080 in the text with the actual ip and port.
## Step 1 - Construct the teams table.
a. Api request example, you can generate sample data.
- i. GET request: http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true (put into the browser can download the corresponding csv file)
+ i. GET request: http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true (put into the browser can download the corresponding csv file)
- ii. The corresponding curl command.
-```
-curl --location --request GET 'http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true'
-```
+ ii. The corresponding curl command:
+ curl --location --request GET 'http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true'
+
b. The actual api request.
- i. Create the corresponding teams file: teams.csv
+ i. Create the corresponding teams file: teams.csv
(Notes: 1.The table table field names should have initial capital letters. 2.Be careful not to change the file suffix when opening csv files through the tool ).
- ii. The corresponding curl command.(Quick copy folder path for macOS, Shortcut option + command + c)
-
-```
-curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --form 'file=@"/xxxpath/teams.csv"'
-```
+ ii. The corresponding curl command(Quick copy folder path for macOS, Shortcut option + command + c):
+ curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --form 'file=@"/xxxpath/teams.csv"'
iii. After successful execution, the teams table is generated and the data can be seen in the database table teams.
(Notes: how to connect to the database: mainly through host, port, username, password, and then through sql tools, such as sequal ace, datagrip and other data, of course you can also access through the command line mysql -h `ip` -u `username` -p -P `port`)
@@ -41,21 +37,18 @@ curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --fo
## Step 2 - Construct user tables (roster)
a. Api request example, you can generate sample data.
- i. Get request: http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true (put into the browser can download the corresponding csv file).
+ i. Get request: http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true (put into the browser can download the corresponding csv file).
+
+ ii. The corresponding curl command:
+ curl --location --request GET 'http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true'
- ii. The corresponding curl command.
-```
-curl --location --request GET 'http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true'
-```
b. The actual api request.
- i. Create the csv file (roster) (Notes: the table header is in capital letters: Id,Email,Name).
-
- ii. The corresponding curl command.
-```
-curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/users.csv' --form 'file=@"/xxxpath/users.csv"'
-```
+ i. Create the csv file (roster) (Notes: the table header is in capital letters: Id,Email,Name).
+
+ ii. The corresponding curl command:
+ curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/users.csv' --form 'file=@"/xxxpath/users.csv"'
iii. After successful execution, the users table is generated and the data can be seen in the database table users.
@@ -75,7 +68,7 @@ accounts table is collected by users through devlake. You can see the accounts t
## Step 5 - Automatically match existing accounts and users through api requests
-a. api request: the name of the plugin is "org", connctionId is order to keep same with other plugins.
+a. Api request: the name of the plugin is "org", connctionId is order to keep same with other plugins.
```
curl --location --request POST '127.0.0.1:8080/pipelines' \
@@ -105,7 +98,7 @@ After generating the user_accounts relationship, the user can get the associated
a. http://127.0.0.1:8080/plugins/org/user_account_mapping.csv (put into the browser to download the file directly)
-b. The corresponding curl command.
+b. The corresponding curl command:
```
curl --location --request GET 'http://127.0.0.1:8080/plugins/org/user_account_mapping.csv'
```
@@ -123,7 +116,7 @@ FROM accounts a
## Step 7 - Update user_accounts if you need
If the association between user and account is not as expected, you can change the user_account_mapping.csv file. For example, I change the UserId in the line Id=github:GithubAccount:1:1234 in the user_account_mapping.csv file to 2, and then upload the user_account_mapping.csv file through the api interface.
-a. The corresponding curl command.
+a. The corresponding curl command:
```
curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/user_account_mapping.csv' --form 'file=@"/xxxpath/user_account_mapping.csv"'
```