Skip to content

Commit 138db94

Browse files
authored
allow assigning users to the newly-created issues (#30)
* allow passing a list of assigned users * use a comma-separated string instead * use github script (node?) to split the string * use a variable instead * document that all users have to have commit rights
1 parent 90c1fee commit 138db94

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

action.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ inputs:
1616
Labels to apply to issue
1717
required: false
1818
default: "CI"
19+
assignees:
20+
description: >-
21+
Comma-separated users to assign to the issue (no spaces). All assigned users have to
22+
have commit rights.
23+
required: false
24+
default: ""
1925
outputs: {}
2026
branding:
2127
color: "red"
@@ -46,6 +52,7 @@ runs:
4652
const fs = require('fs');
4753
const pytest_logs = fs.readFileSync('pytest-logs.txt', 'utf8');
4854
const title = "${{ inputs.issue-title }}"
55+
const assignees = "${{inputs.assignees}}".split(",")
4956
const workflow_url = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`
5057
const issue_body = `[Workflow Run URL](${workflow_url})\n${pytest_logs}`
5158
@@ -80,7 +87,8 @@ runs:
8087
repo: variables.name,
8188
body: issue_body,
8289
title: title,
83-
labels: [variables.label]
90+
labels: [variables.label],
91+
assignees: assignees
8492
})
8593
} else {
8694
github.rest.issues.update({

0 commit comments

Comments
 (0)