-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
79 lines (77 loc) · 4.36 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: 'Nissuer'
description: 'A GitHub Action for tried and tired maintainers.'
author: 'Balázs Orbán'
branding:
icon: check-square
color: orange
inputs:
comment-add-explainer:
description: 'Add an explainer to a comment that was marked as off-topic. Example: "true"'
default: 'true'
comment-unhelpful-weight:
description: 'If an issue comment is below this rate, it will be marked as off-topic and gets hidden. Example: 0.3'
default: '0.3'
reproduction-comment:
description: 'Either a string or a path to a .md file inside the repository. Example: ".github/invalid-reproduction.md"'
default: '.github/invalid-reproduction.md'
reproduction-hosts:
description: 'Comma-separated list of hostnames that are allowed for reproductions. Example: "github.com,codesandbox.io"'
default: github.com
reproduction-blocklist:
description: 'Comma-separated list of regular expression string that are not allowed for reproductions. Example: "github.com/.*/fork-of-example"'
default: ''
reproduction-invalid-label:
description: 'Label to apply to issues without a valid reproduction. Example: "invalid-reproduction"'
default: 'invalid-reproduction'
reproduction-issue-labels:
description: 'Comma-separated list of issue labels. If configured, only verify reproduction URLs of issues with one of these labels present. Adding a comma at the end will handle non-labeled issues as invalid. Example: "bug,", will consider issues with the label "bug" or no label.'
default: ''
reproduction-link-section:
description: 'A regular expression string with "(.*)" matching a valid URL in the issue body. The result is trimmed. Example: "### Link to reproduction(.*)### To reproduce"'
default: '### Link to reproduction(.*)### To reproduce'
label-comments:
description: 'Autocomment on issues based on the added label. It should be a JSON object, where the key is a label, and the value is a file path or a comment text. Example: {"invalid reproduction": ".github/invalid-reproduction.md"}'
default: '{"invalid reproduction": ".github/invalid-reproduction.md"}'
label-area-prefix:
description: 'Only look for these labels when autolabeling based on the user selection. Example: "area:"'
default: 'area:'
label-area-section:
description: 'A regular expression string with "(.*)" matching a section in the issue body to look for user selected areas. The result is trimmed. Example: "### Which area(s) are affected?(.*)### Additional context"'
label-area-match:
description: 'When autolabeling based on the user selection, look for the label names or description. Example: "name"'
default: 'description'
webhook-url:
description: 'Webhook URL to send notifications to. Example: "https://example.com/api/webhooks/nissuer"'
default: ''
webhook-secret:
description: 'Secret to use for the webhook.'
default: ''
delete-vulnerability-report:
description: 'Delete the vulnerability report after sending it to the webhook. Example: "false"'
default: 'false'
runs:
using: "composite"
steps:
- name: Checkout code
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v4
- name: Run action
run: node ${{ github.action_path }}/dist/index.js
shell: sh
# https://github.com/actions/runner/issues/665#issuecomment-676581170
env:
"INPUT_COMMENT_ADD_EXPLAINER": ${{inputs.comment-add-explainer}}
"INPUT_COMMENT_UNHELPFUL_WEIGHT": ${{inputs.comment-unhelpful-weight}}
"INPUT_DELETE_VULNERABILITY_REPORT": ${{inputs.delete-vulnerability-report}}
"INPUT_LABEL_AREA_PREFIX": ${{inputs.label-area-prefix}}
"INPUT_LABEL_AREA_MATCH": ${{inputs.label-area-match}}
"INPUT_LABEL_AREA_SECTION": ${{inputs.label-area-section}}
"INPUT_LABEL_COMMENTS": ${{inputs.label-comments}}
"INPUT_REPRODUCTION_COMMENT": ${{inputs.reproduction-comment}}
"INPUT_REPRODUCTION_HOSTS": ${{inputs.reproduction-hosts}}
"INPUT_REPRODUCTION_BLOCKLIST": ${{inputs.reproduction-blocklist}}
"INPUT_REPRODUCTION_INVALID_LABEL": ${{inputs.reproduction-invalid-label}}
"INPUT_REPRODUCTION_ISSUE_LABELS": ${{inputs.reproduction-issue-labels}}
"INPUT_REPRODUCTION_LINK_SECTION": ${{inputs.reproduction-link-section}}
"INPUT_WEBHOOK_SECRET": ${{inputs.webhook-secret}}
"INPUT_WEBHOOK_URL": ${{inputs.webhook-url}}