-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
70 lines (65 loc) · 2.46 KB
/
action.yaml
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
---
name: pull-requester
description: |-
A GitHub Action for running standard checks and automations on pull requests
for the n3tuk Organisation.
inputs:
title-minimum:
description: The lower bound for the number of characters that the title should contain
required: false
default: '25'
body-split:
description: The set of characters which split the body and the pull request template
required: false
default: '---'
body-minimum:
description: The lower bound for the number of characters that the body should contain
required: false
default: '100'
label-prefixes:
description: A comma-separated list of label prefixes to check for on a pull request
required: false
default: ''
label-prefix-mode:
description: Set if any one prefix, or all label prefixes, must match to pass
required: false
default: 'all'
auto-assign:
description: Set whether to enable auto-assignment of a pull request to the creator
required: false
default: 'true'
runs:
using: composite
steps:
- name: Fetch the pull-requester artifact
shell: bash
env:
GITHUB_TOKEN: ${{ github.token }}
# Both github.action_repository and .action_ref are not available inside
# the run: statement, but they are available under env: so set them here
# so they can be accessed as normal environment variable under the
# run: statement instead. See the following for more information:
# https://github.com/actions/runner/issues/2473
GH_ACTION_REPOSITORY: ${{ github.action_repository || github.repository }}
GH_ACTION_REF: ${{ github.action_ref || github.ref_name }}
run: |-
${{ github.action_path }}/scripts/fetch \
"${GH_ACTION_REPOSITORY}" \
"${GH_ACTION_REF}"
- name: Run pull-requester against the pull request
shell: bash
env:
GITHUB_TOKEN: ${{ github.token }}
run: |-
${{ github.action_path }}/bin/pull-requester run \
--repository=${{ github.repository }} \
--number=${{ github.event.pull_request.number }} \
--title-minimum=${{ inputs.title-minimum }} \
--body-split=${{ inputs.body-split }} \
--body-minimum=${{ inputs.body-minimum }} \
--label-prefixes=${{ inputs.label-prefixes }} \
--label-prefix-mode=${{ inputs.label-prefix-mode }} \
--auto-assign=${{ inputs.auto-assign }} \
branding:
icon: user-check
color: gray-dark