Skip to content

Commit f9aa08b

Browse files
authored
Add auto-assign feature for GitHub Copilot in issue creation (#2830)
1 parent 9d4be9a commit f9aa08b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,15 @@ To add these secrets to your portal:
242242
"icon": "DefaultProperty",
243243
"type": "array",
244244
"title": "Issue Labels",
245-
"description": "Labels to add to the issue, following format: [\"label1\",\"label2\"]"
245+
"description": "Labels to add to the issue, following format: [\"label1\",\"label2\"]",
246+
"default": []
247+
},
248+
"assign_to_copilot": {
249+
"icon": "DefaultProperty",
250+
"type": "boolean",
251+
"title": "Auto-assign to Copilot",
252+
"description": "Automatically assign this issue to GitHub Copilot for AI-powered coding assistance",
253+
"default": false
246254
},
247255
"body": {
248256
"title": "Issue Body",
@@ -259,6 +267,7 @@ To add these secrets to your portal:
259267
"order": [
260268
"title",
261269
"body",
270+
"assign_to_copilot",
262271
"labels"
263272
]
264273
},
@@ -279,7 +288,7 @@ To add these secrets to your portal:
279288
"body": {
280289
"title": "{{ .inputs.title }}",
281290
"body": "{{ .inputs.body }}",
282-
"labels": "{{ .inputs.labels }}"
291+
"labels": "{{ if .inputs.assign_to_copilot then (.inputs.labels + [\"auto_assign\"]) else .inputs.labels end }}"
283292
}
284293
},
285294
"requiredApproval": false
@@ -684,7 +693,7 @@ Now let us test the complete workflow to ensure everything works correctly.
684693
### Run the self-service action
685694

686695
1. Run the self-service action to create a new GitHub issue.
687-
2. Make sure to add the `auto_assign` label to the issue.
696+
2. Toggle the `auto_assign_to_copilot` on to assign the issue to copilot.
688697
3. Go to the issue in GitHub and verify that Copilot is assigned.
689698
4. Check that a pull request (PR) is opened for the issue.
690699

0 commit comments

Comments
 (0)