Skip to content

Commit

Permalink
Merge pull request #644 from NLeSC/534-code-of-conduct-email
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira authored Aug 29, 2024
2 parents 79a3101 + f00781c commit 632f80c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 10 additions & 0 deletions copier/questions/features_community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ SelectCommunityFeatures:
value: AddContributing_flag
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"

code_of_conduct_email:
when: "{{ 'AddCodeConduct_flag' in SelectCommunityFeatures }}"
type: str
default: "{{ email }}"
help: What is the email address to report code of conduct violations?
validator: >-
{% 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,})+')) %}
Please enter a valid email address
{% endif %}
# computed features
AddCodeConduct:
type: bool
Expand Down
8 changes: 0 additions & 8 deletions copier/questions/package_details.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ email:
{% if not (email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %}
Please enter a valid email address
{% endif %}
code_of_conduct_email:
type: str
default: "{{ email }}"
help: What is the email address to report code of conduct violations?
validator: >-
{% 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,})+')) %}
Please enter a valid email address
{% endif %}
copyright_holder:
type: str
default: "{{ full_name }}"
Expand Down

0 comments on commit 632f80c

Please sign in to comment.