Skip to content

Commit 632f80c

Browse files
authored
Merge pull request #644 from NLeSC/534-code-of-conduct-email
2 parents 79a3101 + f00781c commit 632f80c

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

copier/questions/features_community.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ SelectCommunityFeatures:
2121
value: AddContributing_flag
2222
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
2323

24+
code_of_conduct_email:
25+
when: "{{ 'AddCodeConduct_flag' in SelectCommunityFeatures }}"
26+
type: str
27+
default: "{{ email }}"
28+
help: What is the email address to report code of conduct violations?
29+
validator: >-
30+
{% if not (code_of_conduct_email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %}
31+
Please enter a valid email address
32+
{% endif %}
33+
2434
# computed features
2535
AddCodeConduct:
2636
type: bool

copier/questions/package_details.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ email:
3535
{% if not (email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %}
3636
Please enter a valid email address
3737
{% endif %}
38-
code_of_conduct_email:
39-
type: str
40-
default: "{{ email }}"
41-
help: What is the email address to report code of conduct violations?
42-
validator: >-
43-
{% if not (code_of_conduct_email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %}
44-
Please enter a valid email address
45-
{% endif %}
4638
copyright_holder:
4739
type: str
4840
default: "{{ full_name }}"

0 commit comments

Comments
 (0)