Skip to content

Commit 9497e74

Browse files
committed
Update GitHub pull request blueprint setup instructions in the documentation, clarifying the automatic creation of blueprints after installing Port's GitHub App and removing outdated steps for manual blueprint creation.
1 parent 2260a0c commit 9497e74

File tree

1 file changed

+1
-161
lines changed

1 file changed

+1
-161
lines changed

docs/guides/all/map-prs-to-services-in-monorepo.md

Lines changed: 1 addition & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -25,171 +25,11 @@ This guide assumes that the sub-components are organized in directories with a `
2525

2626
## Set up data model
2727

28-
If you haven't installed the [GitHub integration](/build-your-software-catalog/sync-data-to-catalog/git/github), you'll need to create a blueprint for GitHub pull requests in Port.
29-
However, we highly recommend you install the GitHub integration to have the blueprint automatically set up for you.
28+
After installing Port's [GitHub App](/build-your-software-catalog/sync-data-to-catalog/git/github/github.md), several blueprints are automatically created in your portal, including the `githubPullRequest` blueprint. However you need to update the blueprint with some additional properties in this setup.
3029

31-
If you've already installed the GitHub integration you have to [update the pull request blueprint](#update-the-pull-request-blueprint) to include the
32-
`file_change_url` property.
33-
34-
### Create the repository blueprint
35-
36-
1. Go to the [blueprints](https://app.getport.io/settings/blueprints) page of your portal.
37-
38-
2. Click on `+ Blueprint`.
39-
40-
3. Click on the `Edit JSON` button in the top right corner.
41-
42-
4. Copy and paste the following JSON schema:
43-
44-
<details>
45-
<summary><b>Repository blueprint (Click to expand)</b></summary>
46-
47-
```json showLineNumbers
48-
{
49-
"identifier": "githubRepository",
50-
"title": "Repository",
51-
"icon": "Github",
52-
"schema": {
53-
"properties": {
54-
"readme": {
55-
"title": "README",
56-
"type": "string",
57-
"format": "markdown"
58-
},
59-
"url": {
60-
"title": "Repository URL",
61-
"type": "string",
62-
"format": "url"
63-
},
64-
"defaultBranch": {
65-
"title": "Default branch",
66-
"type": "string"
67-
}
68-
},
69-
"required": []
70-
},
71-
"mirrorProperties": {},
72-
"calculationProperties": {},
73-
"relations": {}
74-
}
75-
76-
```
77-
</details>
78-
79-
5. Click "Save" to create the blueprint.
80-
81-
82-
### Create the pull request blueprint
83-
84-
1. Go to the [blueprints](https://app.getport.io/settings/blueprints) page of your portal.
85-
86-
2. Click on `+ Blueprint`.
87-
88-
3. Click on the `Edit JSON` button in the top right corner.
89-
90-
4. Copy and paste the following JSON schema:
91-
92-
<details>
93-
<summary><b>GitHub pull request blueprint (Click to expand)</b></summary>
94-
95-
```json showLineNumbers
96-
{
97-
"identifier": "githubPullRequest",
98-
"title": "Pull Request",
99-
"icon": "Github",
100-
"schema": {
101-
"properties": {
102-
"creator": {
103-
"title": "Creator",
104-
"type": "string"
105-
},
106-
"assignees": {
107-
"title": "Assignees",
108-
"type": "array"
109-
},
110-
"reviewers": {
111-
"title": "Reviewers",
112-
"type": "array"
113-
},
114-
"status": {
115-
"title": "Status",
116-
"type": "string",
117-
"enum": ["merged", "open", "closed"],
118-
"enumColors": {
119-
"merged": "purple",
120-
"open": "green",
121-
"closed": "red"
122-
}
123-
},
124-
"closedAt": {
125-
"title": "Closed At",
126-
"type": "string",
127-
"format": "date-time"
128-
},
129-
"updatedAt": {
130-
"title": "Updated At",
131-
"type": "string",
132-
"format": "date-time"
133-
},
134-
"mergedAt": {
135-
"title": "Merged At",
136-
"type": "string",
137-
"format": "date-time"
138-
},
139-
"createdAt": {
140-
"title": "Created At",
141-
"type": "string",
142-
"format": "date-time"
143-
},
144-
"link": {
145-
"format": "url",
146-
"type": "string"
147-
},
148-
"leadTimeHours": {
149-
"title": "Lead Time in hours",
150-
"type": "number"
151-
},
152-
"file_change_url": {
153-
"type": "string",
154-
"title": "File change URL",
155-
"format": "url"
156-
}
157-
},
158-
"required": []
159-
},
160-
"mirrorProperties": {},
161-
"calculationProperties": {
162-
"days_old": {
163-
"title": "Days Old",
164-
"icon": "DefaultProperty",
165-
"calculation": "(now / 86400) - (.properties.createdAt | capture(\"(?<date>\\\\d{4}-\\\\d{2}-\\\\d{2})\") | .date | strptime(\"%Y-%m-%d\") | mktime / 86400) | floor",
166-
"type": "number"
167-
}
168-
},
169-
"relations": {
170-
"repository": {
171-
"title": "Repository",
172-
"target": "githubRepository",
173-
"required": false,
174-
"many": false
175-
},
176-
"services": {
177-
"title": "Services",
178-
"target": "service",
179-
"required": false,
180-
"many": true
181-
}
182-
}
183-
}
184-
```
185-
</details>
186-
187-
5. Click "Save" to create the blueprint.
18830

18931
### Update the pull request blueprint
19032

191-
Skip this step if you just manually [created the pull request blueprint](#create-the-pull-request-blueprint).
192-
19333
1. Go to the [blueprints](https://app.getport.io/settings/blueprints) page of your portal.
19434

19535
2. Find the `githubPullRequest` blueprint and click on it.

0 commit comments

Comments
 (0)