-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
66 lines (63 loc) · 3.6 KB
/
action.yml
File metadata and controls
66 lines (63 loc) · 3.6 KB
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
name: 'Azure DevOps Commit Validator and Pull Request Linker'
description: 'Enforce that each commit in a pull request has AB# in the commit message and link all of the work items to the pull request'
branding:
icon: 'user-check'
color: 'purple'
inputs:
check-pull-request:
description: 'Check the pull request for AB#xxx (scope configurable via pull-request-check-scope)'
required: true
default: 'false'
pull-request-check-scope:
description: 'Only if check-pull-request=true, where to look for AB# in the pull request. Options: title-or-body, body-only, title-only'
required: false
default: 'title-or-body'
check-commits:
description: 'Check each commit in the pull request for AB#xxx'
required: true
default: 'true'
fail-if-missing-workitem-commit-link:
description: 'Only if check-commits=true, fail the action if a commit in the pull request is missing AB# in every commit message'
required: false
default: 'true'
link-commits-to-pull-request:
description: 'Only if check-commits=true, link the work items found in commits to the pull request'
required: false
default: 'true'
azure-devops-token:
description: 'Azure DevOps Personal Access Token (needs to be a full PAT). Required when any of these are enabled: link-commits-to-pull-request, validate-work-item-exists, add-work-item-table, or add-work-item-from-branch'
required: false
azure-devops-organization:
description: 'The name of the Azure DevOps organization. Required when any of these are enabled: link-commits-to-pull-request, validate-work-item-exists, add-work-item-table, or add-work-item-from-branch'
required: false
github-token:
description: 'The GitHub token that has `contents: read` and `pull-requests: write` access'
required: true
default: ${{ github.token }}
comment-on-failure:
description: 'Comment on the pull request if the action fails'
required: true
default: 'true'
validate-work-item-exists:
description: 'Validate that the work item(s) referenced in commits and PR exist in Azure DevOps. Requires azure-devops-token and azure-devops-organization to be set.'
required: false
default: 'true'
add-work-item-table:
description: 'Add a Linked Work Items table to the PR body showing titles for AB#xxx references (original AB# references are preserved). Requires azure-devops-token and azure-devops-organization to be set.'
required: false
default: 'false'
add-work-item-from-branch:
description: 'Automatically extract work item ID(s) from the head branch name and add AB#xxx to the PR body if not already present (e.g. branch task/12345/fix-bug adds AB#12345 to the PR body). Only numbers following one of the configured branch-work-item-prefixes keywords are extracted. Each extracted ID is always validated against Azure DevOps before being added regardless of the validate-work-item-exists setting. Requires azure-devops-token and azure-devops-organization to be set.'
required: false
default: 'false'
branch-work-item-prefixes:
description: 'Comma-separated list of keyword prefixes used to identify work item IDs in branch names (e.g. task/12345). Only numbers following one of these keywords (separated by /, -, or _) are extracted. Only used when add-work-item-from-branch is true.'
required: false
default: 'task, bug, bugfix'
branch-work-item-min-digits:
description: 'Minimum number of digits for a work item ID extracted from a branch name. Set to 1 to match any length. Only used when add-work-item-from-branch is true.'
required: false
default: '5'
runs:
using: 'node24'
main: 'dist/index.js'