-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobo.example.yml
103 lines (103 loc) · 6.3 KB
/
robo.example.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# These are the 'default' options if no options or robo.yml are in place.
command:
validate:
# Used in 'validate:coding-standards' and 'validate:branch-name'
options:
# This is used as a token replacement. It is most useful for 'pattern' so
# you can ensure that commit and branch names have an issue number in them
# so that Jira, GitHub, or Gitlab know which commits and branches belong
# to which issue.
# For example, if your bitbucket issue was XZY-1234, you can make project-id
# XYZ.
# This value can be anything you want, as long as it is consistent.
project-id: ''
# Used in 'validate:coding-standards'
# Requires https://github.com/squizlabs/PHP_CodeSniffer be installed.
coding-standards:
options:
# This is required for non-Drupal projects. It will be in the form of:
# path/to/files/a:
# extensions: 'php,module,inc'
# ignore: '*node_modules/*,*bower_components/*,*vendor/*,*.min.js,*.min.css'
# path/to/files/b: {}
# path/to/files/c:
# standard: 'Drupal'
# The key is used as the path, and the value are the options passed to PHPCS.
# If no options are given, as in 'b', then 'similar-options' will be used.
# If any options are given, then similar options will not be used, so you must
# add any options in 'similar-options' that should be there in addition to the
# overrides.
# The 'standard' is different. If it is not given, it will use the 'standards' option.
# If it is given, it will override 'standards' option.
# If 'standard' is only given, as in 'c' 'similar-options' WILL still be applied.
paths: {}
# These are the options passed to PHPCS if 'paths' does not set any options.
# Please see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options
# and https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage.
similar-options:
standard: 'Drupal,DrupalPractice'
extensions: 'php,module,inc,install,test,profile,theme,css,info'
ignore: '*node_modules/*,*bower_components/*,*vendor/*,*.min.js,*.min.css'
# Used in 'validate:composer-lock'
composer-lock:
options:
# Can be set to a global location if needed.
composer-path: 'vendor/bin/composer'
# Only useful if composer.json lives in something besides the root directory.
working-directory: './'
# Used in 'validate:commit-messages'
commit-messages:
options:
# This is the branch that the current branch is going to be merged into.
target-branch: develop
# The git reference to use as the start of the commits going into target-branch.
current-branch: 'HEAD'
# The name of the git remote to pull the latest commits from.
git-remote: origin
# The regular expression that must match for all commits not in 'target-branch'.
# Note how {$project_id} is not part of the pattern but replaced with whatever is
# in 'project-id' before the regular expression is used.
pattern: '/^{$project_id}-(\d+): /'
# These next two describe how the commits should be formed.
short-help: 'Commit messages must start with: ''{$project_id}-x:y'''
long-help:
- 'Where x is the ticket number.'
- 'And y is a space.'
- ''
- 'How do I update my commit messages?'
- 'See https://www.atlassian.com/git/tutorials/rewriting-history'
- ''
- 'After re-rewriting the history, you should --force-with-lease the push.'
- 'https://stackoverflow.com/questions/52823692/git-push-force-with-lease-vs-force#:~:text=%2D%2Dforce%2Dwith%2Dlease%20is%20a%20safer%20option%20that%20will,elses%20work%20by%20force%20pushing.'
# Used in 'validate:branch-name'
branch-name:
options:
# The regular expression that must match the branch name.
# The {$project_id} will be replaced by command.validate.options.project-id. If you don't want the
# project ID in the branch names, remove '{$project_id}-'.
# The '([\d]{1,})' portion after the project ID matches the issue numbers in the tracker. In this case
# it matches at least one digit. The rest of the regex is the 'y' variable in the custom-help propery.
pattern: '/^feature\/{$project_id}-(\d+)-(?!.*--)([a-z\d]{1})([a-z\d-]{3,})([a-z\d]{1})$/'
# Show help messages if the branch name does not match.
custom-help:
- 'feature/{$project_id}-x-y'
- ' Where x is the ticket number.'
- ' And y is:'
- ' - Always lower case.'
- ' - Starts and end with a letter or integer.'
- ' - Contains letters, integers, or dashes (non-consecutive).'
- ' - At least 5 characters long.'
# These refer to all the possible branch names. There are 4 different types and they will be
# described below. If you'd like to override any of these, you must put all back in that you'd like to
# use, they will not be merged together.
valid-branch-names:
# Matches a branch named 'develop'.
- 'explicit|develop'
# Matches a branch named 'main'.
- 'explicit|main'
# Matches a custom regular expression found in $pattern.
- 'custom|'
# Matches a branch like: hotfix/2.1.3.
- 'semantic|hotfix'
# Matches a branch like (the last number MUST be a 0): release/2.1.0.
- 'semantic_end_0|release'