Skip to content

Commit a938118

Browse files
simplify GitHub user mapping and add bot user filtering
Signed-off-by: Dennis Bilson <dennis.bilson@port.io>
1 parent 71f0e18 commit a938118

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/_github_exporter_example_port_app_config.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ resources:
3030
title: ".title"
3131
blueprint: '"githubPullRequest"'
3232
properties:
33-
creator: .creator.login | gsub("\\["; "-") | gsub("\\](?=[^$])"; "-") | gsub("\\]$"; "")
34-
assignees: "[.assignees[].login | gsub("\\["; "-") | gsub("\\](?=[^$])"; "-") | gsub("\\]$"; "")]"
35-
reviewers: "[.requested_reviewers[].login | gsub("\\["; "-") | gsub("\\](?=[^$])"; "-") | gsub("\\]$"; "")]"
33+
creator: .user.login
34+
assignees: "[.assignees[].login]"
35+
reviewers: "[.requested_reviewers[].login]"
3636
status: ".state" # merged, closed, opened
3737
closedAt: ".closed_at"
3838
updatedAt: ".updated_at"

docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-repository-admins/_github_exporter_example_admins_users_port_app_config.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
14
<details>
25

36
<summary><b> Port port-app-config.yml (click to expand)</b></summary>
@@ -24,6 +27,7 @@ resources:
2427
- kind: user
2528
selector:
2629
query: "true"
30+
includeBots: "false"
2731
port:
2832
entity:
2933
mappings:
@@ -46,3 +50,21 @@ resources:
4650
```
4751
4852
</details>
53+
54+
<Tabs groupId="config" queryString="parameter">
55+
56+
<TabItem label="Include Bot Users" value="includeBots">
57+
58+
The `includeBots` selector is used to include bot users in the sync process. By default, it is set to `false`.
59+
60+
```yaml
61+
- kind: user
62+
selector:
63+
query: 'true'
64+
# highlight-next-line
65+
includeBots: 'false'
66+
```
67+
68+
</TabItem>
69+
70+
</Tabs>

docs/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/examples/example-team-members/_github_team_member_port_app_config.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<details>
2-
<summary><b>Port port-app-config.yaml (click to expand)</b></summary>
2+
<summary><b>Port port-app-config.yaml (click to expand)</b></summary>
33

44
```yaml showLineNumbers
55
- kind: team
@@ -19,7 +19,7 @@
1919
permission: .permission
2020
notification_setting: .notificationSetting
2121
relations:
22-
team_member: '[.members.nodes[].login | gsub("\\["; "-") | gsub("\\](?=[^$])"; "-") | gsub("\\]$"; "")]'
22+
team_member: '[.members.nodes[].login]'
2323
- kind: team
2424
selector:
2525
query: 'true'
@@ -28,7 +28,7 @@
2828
itemsToParse: .members.nodes
2929
entity:
3030
mappings:
31-
identifier: .login | gsub("\\["; "-") | gsub("\\](?=[^$])"; "-") | gsub("\\]$"; "")
31+
identifier: .login
3232
title: .login
3333
blueprint: '"githubTeamMember"'
3434
properties:

0 commit comments

Comments
 (0)