-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
27 lines (27 loc) · 1.1 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
name: 'AntiSpam PR Labeler and Commenter'
description: 'Automatically labels and comments on pull requests based on the number of changes.'
inputs:
repo-token:
description: 'The GitHub token for authentication.'
required: true
max-changes-for-label:
description: 'The maximum number of changes a PR can have before being labeled.'
required: true
default: '2'
label-message:
description: 'Custom message to post on PRs that are labeled as potential spam.'
required: false
default: 'This PR has been automatically labeled as "Potential Spam" due to its size. Please review.'
runs:
using: 'composite'
steps:
- name: Label and comment on PRs
shell: pwsh
run: ${{ github.action_path }}/scripts/AntiSpamPRLabeler.ps1
env:
GITHUB_TOKEN: ${{ inputs.repo-token }}
REPOSITORY_NAME: ${{ github.event.repository.name }}
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
LABEL_MESSAGE: ${{ inputs.label-message }}
MAX_CHANGES_FOR_LABEL: ${{ inputs.max-changes-for-label }}
PR_NUMBER: ${{ github.event.pull_request.number }}