Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow assigning users to the newly-created issues #30

Merged
merged 5 commits into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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