Skip to content

Commit 9bfbd67

Browse files
authored
Merge pull request #2814 from port-labs/task_t2oe9t/add_the_github_issue_mapping_to_the_guide_trigger_github_copilot_from_port
Added the github issue mapping configuration to the trigger copilot guide
2 parents 56194e7 + 0efca33 commit 9bfbd67

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

docs/guides/all/trigger-github-copilot-from-port.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,50 @@ When installing Port's GitHub app, the pull request and repository blueprints ar
123123

124124
5. Click `Create` to save the blueprint.
125125

126+
### Update GitHub integration mapping
127+
128+
Update the GitHub integration configuration to include the new `githubIssue` blueprint in your mapping. This ensures that GitHub issues are properly synced to Port with all the required properties and relationships.
129+
130+
1. Go to the [data sources](https://app.getport.io/settings/data-sources) page of your portal.
131+
132+
2. Find your GitHub integration and click on it.
133+
134+
3. Go to the `Mapping` tab.
135+
136+
4. Add the following YAML block to map issues to the `githubIssue` blueprint:
137+
138+
<details>
139+
<summary><b>GitHub integration mapping (Click to expand)</b></summary>
140+
141+
```yaml showLineNumbers
142+
- kind: issue
143+
selector:
144+
query: .pull_request == null
145+
port:
146+
entity:
147+
mappings:
148+
identifier: .repository.name + (.id|tostring)
149+
title: .title
150+
blueprint: '"githubIssue"'
151+
properties:
152+
creator: .user.login
153+
assignees: '[.assignees[].login]'
154+
labels: '[.labels[].name]'
155+
status: .state
156+
createdAt: .created_at
157+
closedAt: .closed_at
158+
updatedAt: .updated_at
159+
description: .body
160+
issueNumber: .number
161+
link: .html_url
162+
relations:
163+
repository: .user.login + "/" + .repo
164+
165+
```
166+
</details>
167+
168+
5. Click `Save & Resync` to apply the mapping.
169+
126170

127171
### Auto-assign issues to request creator
128172

0 commit comments

Comments
 (0)