Skip to content

Commit

Permalink
allow assigning users to the newly-created issues (#30)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
keewis committed Dec 5, 2023
1 parent 90c1fee commit 138db94
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ inputs:
Labels to apply to issue
required: false
default: "CI"
assignees:
description: >-
Comma-separated users to assign to the issue (no spaces). All assigned users have to
have commit rights.
required: false
default: ""
outputs: {}
branding:
color: "red"
Expand Down Expand Up @@ -46,6 +52,7 @@ runs:
const fs = require('fs');
const pytest_logs = fs.readFileSync('pytest-logs.txt', 'utf8');
const title = "${{ inputs.issue-title }}"
const assignees = "${{inputs.assignees}}".split(",")
const workflow_url = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`
const issue_body = `[Workflow Run URL](${workflow_url})\n${pytest_logs}`
Expand Down Expand Up @@ -80,7 +87,8 @@ runs:
repo: variables.name,
body: issue_body,
title: title,
labels: [variables.label]
labels: [variables.label],
assignees: assignees
})
} else {
github.rest.issues.update({
Expand Down

0 comments on commit 138db94

Please sign in to comment.