Skip to content

Commit 4960877

Browse files
committed
Release
1 parent f835597 commit 4960877

File tree

11 files changed

+526
-142
lines changed

11 files changed

+526
-142
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* cookiecutter-python version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
9+
Tell us what happened, what went wrong, and what you expected to happen.
10+
11+
### What I Did
12+
13+
```
14+
Paste the command(s) you ran and the output.
15+
If there was a crash, please include the traceback here.
16+
```

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Description
2+
3+
Please include a summary of the changes and a link/description of the related issue.
4+
Please also include relevant motivation and context.
5+
6+
7+
# Has This Been Tested?
8+
9+
Please describe the tests that you ran to verify your changes. Provide instructions to reproduce.
10+
11+
Please also list any relevant details for your test configuration
12+
13+
14+
# Checklist:
15+
16+
- [ ] I've read the contributing guidelines of this project
17+
- [ ] I've added a `BUMP_MAJOR`, `BUMP_MINOR`, or `BUMP_PATCH` label to this PR to increment the version
18+
- [ ] I've installed and used `.pre_commit` on all my code
19+
- [ ] I have documented my code, particularly in hard-to-understand areas
20+
- [ ] I have made any necessary corresponding changes to the documentation

.github/dependabot.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
labels:
8+
- dependencies
9+
- BUMP_PATCH
10+
- package-ecosystem: pip
11+
directory: /.github/workflows
12+
schedule:
13+
interval: monthly
14+
labels:
15+
- dependencies
16+
- BUMP_PATCH
17+
- package-ecosystem: pip
18+
directory: /docs
19+
schedule:
20+
interval: monthly
21+
labels:
22+
- dependencies
23+
- BUMP_PATCH
24+
- package-ecosystem: pip
25+
directory: /
26+
schedule:
27+
interval: monthly
28+
versioning-strategy: lockfile-only
29+
allow:
30+
- dependency-type: all
31+
labels:
32+
- dependencies
33+
- BUMP_PATCH

.github/labels.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Labels names are important as they are used by Release Drafter to decide
2+
# regarding where to record them in changelog or if to skip them.
3+
#
4+
# The repository labels will be automatically configured using this file and
5+
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
6+
- name: BUMP_MAJOR
7+
description: Apply a MAJOR version bump
8+
color: af9500
9+
- name: BUMP_MINOR
10+
description: Apply a MINOR version bump
11+
color: d7d7d7
12+
- name: BUMP_PATCH
13+
description: Apply a PATCH version bump
14+
color: ad8a56
15+
- name: breaking
16+
description: Breaking Changes
17+
color: bfd4f2
18+
- name: bug
19+
description: Something isn't working
20+
color: d73a4a
21+
- name: build
22+
description: Build System and Dependencies
23+
color: bfdadc
24+
- name: ci
25+
description: Continuous Integration
26+
color: 4a97d6
27+
- name: dependencies
28+
description: Pull requests that update a dependency file
29+
color: 0366d6
30+
- name: documentation
31+
description: Improvements or additions to documentation
32+
color: 0075ca
33+
- name: duplicate
34+
description: This issue or pull request already exists
35+
color: cfd3d7
36+
- name: enhancement
37+
description: New feature or request
38+
color: a2eeef
39+
- name: github_actions
40+
description: Pull requests that update Github_actions code
41+
color: '000000'
42+
- name: good first issue
43+
description: Good for newcomers
44+
color: 7057ff
45+
- name: help wanted
46+
description: Extra attention is needed
47+
color: 008672
48+
- name: invalid
49+
description: This doesn't seem right
50+
color: e4e669
51+
- name: performance
52+
description: Performance
53+
color: '016175'
54+
- name: python
55+
description: Pull requests that update Python code
56+
color: 2b67c6
57+
- name: question
58+
description: Further information is requested
59+
color: d876e3
60+
- name: refactoring
61+
description: Refactoring
62+
color: ef67c4
63+
- name: removal
64+
description: Removals and Deprecations
65+
color: 9ae7ea
66+
- name: style
67+
description: Style
68+
color: c120e5
69+
- name: testing
70+
description: Testing
71+
color: b1fc6f
72+
- name: wontfix
73+
description: This will not be worked on
74+
color: ffffff
75+
- name: triage
76+
description: This will looked at
77+
color: 68bd3b

.github/release-drafter.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name-template: v$RESOLVED_VERSION 🌈
2+
tag-template: v$RESOLVED_VERSION
3+
categories:
4+
- title: ':boom: Breaking Changes'
5+
label: breaking
6+
- title: ':rocket: Features'
7+
label: enhancement
8+
- title: ':fire: Removals and Deprecations'
9+
label: removal
10+
- title: ':beetle: Fixes'
11+
label: bug
12+
- title: ':racehorse: Performance'
13+
label: performance
14+
- title: ':rotating_light: Testing'
15+
label: testing
16+
- title: ':construction_worker: Continuous Integration'
17+
label: ci
18+
- title: ':books: Documentation'
19+
label: documentation
20+
- title: ':hammer: Refactoring'
21+
label: refactoring
22+
- title: ':lipstick: Style'
23+
label: style
24+
- title: ':package: Dependencies'
25+
labels:
26+
- dependencies
27+
- build
28+
exclude-labels:
29+
- skip-changelog
30+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
31+
change-title-escapes: \<*_&
32+
template: |
33+
## Changes
34+
35+
$CHANGES

.github/workflows/labeler.yaml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Labeler
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
issues:
8+
types: [opened]
9+
pull_request:
10+
types:
11+
- opened
12+
- reopened
13+
- synchronize
14+
- labeled
15+
- unlabeled
16+
branches:
17+
- main
18+
19+
jobs:
20+
21+
label-sync:
22+
if: github.event_name == 'push'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Check out the repository
26+
uses: actions/checkout@v3
27+
- name: Run Labeler
28+
uses: crazy-max/[email protected]
29+
with:
30+
yaml-file: .github/labels.yaml
31+
skip-delete: false
32+
dry-run: false
33+
34+
version-label-check:
35+
if: |
36+
github.event_name == 'pull_request' &&
37+
github.actor != 'dependabot[bot]' &&
38+
(
39+
contains( github.event.labels.*.name, 'BUMP_MAJOR' ) ||
40+
contains( github.event.pull_request.labels.*.name, 'BUMP_MINOR' ) ||
41+
contains( github.event.pull_request.labels.*.name, 'BUMP_PATCH' ) ||
42+
join(github.event.issue.labels) == '' ||
43+
(
44+
!contains( github.event.labels.*.name, 'BUMP_MAJOR' ) &&
45+
!contains( github.event.pull_request.labels.*.name, 'BUMP_MINOR' ) &&
46+
!contains( github.event.pull_request.labels.*.name, 'BUMP_PATCH')
47+
)
48+
)
49+
runs-on: ubuntu-latest
50+
concurrency:
51+
group: ${{ github.ref }}
52+
steps:
53+
- uses: actions/github-script@v6
54+
id: script
55+
with:
56+
script: |
57+
var total_labels = 0
58+
const labels = await github.rest.issues.listLabelsOnIssue({
59+
owner: context.repo.owner,
60+
repo: context.repo.repo,
61+
issue_number: context.issue.number,
62+
})
63+
console.log(labels.data)
64+
for (const label of labels.data) {
65+
if (label.name === 'BUMP_PATCH') {
66+
total_labels += 1
67+
var version = 'patch'
68+
} else if (label.name === 'BUMP_MINOR') {
69+
total_labels += 1
70+
var version = 'minor'
71+
} else if (label.name === 'BUMP_MAJOR') {
72+
total_labels += 1
73+
var version = 'major'
74+
}
75+
}
76+
console.log(total_labels)
77+
if (total_labels != 1) {
78+
var status = 'error'
79+
} else {
80+
var status = 'success'
81+
}
82+
console.log(status)
83+
core.setOutput('status', status)
84+
console.log(version)
85+
core.setOutput('version', version)
86+
- uses: marocchino/sticky-pull-request-comment@v2
87+
if: steps.script.outputs.status != 'success'
88+
with:
89+
header: improper-version-labels
90+
message: |
91+
# Improper Version Labels
92+
You don't have the proper labels on this Pull Request to increment the version.
93+
94+
You must provide one and only one of the following labels to increment the version number:
95+
- `BUMP_MAJOR`
96+
- `BUMP_MINOR`
97+
- `BUMP_PATCH`
98+
delete: true
99+
- uses: marocchino/sticky-pull-request-comment@v2
100+
if: steps.script.outputs.status == 'success'
101+
with:
102+
header: improper-version-labels
103+
delete: true
104+
- if: steps.script.outputs.status != 'success'
105+
run: |
106+
echo "Incompatible Version Bump Labels Applied"
107+
exit 1
108+
109+
apply-triage-label:
110+
if: github.event_name == 'issues'
111+
runs-on: ubuntu-latest
112+
steps:
113+
- uses: actions/github-script@v6
114+
with:
115+
script: |
116+
github.rest.issues.addLabels({
117+
issue_number: context.issue.number,
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
labels: ['triage']
121+
})

0 commit comments

Comments
 (0)