Skip to content

Commit 89ca589

Browse files
authored
Merge pull request #1 from jrbourbeau/add-more-options
Make issue title and label configurable
2 parents 75caf00 + 9460ec9 commit 89ca589

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

action.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ inputs:
66
description: >-
77
The path to the log file
88
required: true
9+
issue-title:
10+
description: >-
11+
Title of issue being created or updated
12+
required: false
13+
default: "⚠️ Nightly upstream-dev CI failed ⚠️"
14+
issue-label:
15+
description: >-
16+
Labels to apply to issue
17+
required: false
18+
default: "CI"
919
outputs: {}
1020
branding:
1121
color: 'red'
@@ -30,7 +40,7 @@ runs:
3040
script: |
3141
const fs = require('fs');
3242
const pytest_logs = fs.readFileSync('pytest-logs.txt', 'utf8');
33-
const title = "⚠️ Nightly upstream-dev CI failed ⚠️"
43+
const title = "${{ inputs.issue-title }}"
3444
const workflow_url = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`
3545
const issue_body = `[Workflow Run URL](${workflow_url})\n${pytest_logs}`
3646
@@ -52,7 +62,7 @@ runs:
5262
const variables = {
5363
owner: context.repo.owner,
5464
name: context.repo.repo,
55-
label: 'CI',
65+
label: "${{ inputs.issue-label }}",
5666
creator: "github-actions[bot]"
5767
}
5868
const result = await github.graphql(query, variables)

0 commit comments

Comments
 (0)