Skip to content

Commit d842352

Browse files
committed
add linting next step as a question
1 parent 7621d1c commit d842352

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

copier/questions/features.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,8 @@ AddDevDoc:
6060
type: bool
6161
default: "{{ template_profile != 'minimum' }}"
6262
help: Add developer documentation?
63+
AddLinting:
64+
when: "{{ template_profile == 'ask' }}"
65+
type: bool
66+
default: "{{ template_profile != 'minimum' }}"
67+
help: Add linting?

template/.github/workflows/next_steps.yml renamed to template/.github/workflows/{% if AddLinting %}next_steps_linting.yml{% endif %}

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ on: [push]
22
permissions:
33
contents: write
44
issues: write
5-
name: Create issues for next steps
5+
name: Create issues for linting
66
jobs:
77
next_steps:
88
runs-on: ubuntu-latest
@@ -13,7 +13,7 @@ jobs:
1313
env:
1414
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1515
with:
16-
filename: .github/next_steps/05_linting.md
16+
filename: .github/workflows/next_steps_linting_issue.md
1717
id: linting
1818
- name: List created issues
1919
run: |
@@ -23,7 +23,8 @@ jobs:
2323
run: |
2424
git config --global user.name 'NLeSC Python template'
2525
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
26-
git rm .github/workflows/next_steps.yml
27-
git rm -r .github/next_steps
26+
git pull # other next step workflows may push changes before
27+
git rm .github/workflows/next_steps_linting.yml
28+
git rm .github/workflows/next_steps_linting_issue.md
2829
git commit -am "Cleanup automated next steps issue generator"
2930
git push

template/.github/next_steps/05_linting.md.jinja renamed to template/.github/workflows/{% if AddLinting %}next_steps_linting_issue.md{% endif %}.jinja

File renamed without changes.

0 commit comments

Comments
 (0)