Skip to content

Commit 3b2e148

Browse files
committed
ci: update issue templates and secret scanning workflow
- Rename bug.yml to bug-report.yml for better clarity - Add feature-request.yml and typo.yml templates for new issue types - Update config.yml to reference new issue templates - Modify secret-check.yml workflow to use TruffleHog main branch - Adjust workflow to run on pull_request and push events - Remove unnecessary comments and update template content Signed-off-by: guanguans <[email protected]>
1 parent 1f32163 commit 3b2e148

File tree

7 files changed

+126
-19
lines changed

7 files changed

+126
-19
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ All notable changes to this project will be documented in this file.
1212
{{ range .Unreleased.CommitGroups -}}
1313
### {{ .Title }}
1414
{{ range .Commits -}}
15-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
15+
16+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} ([{{ .Hash.Short }}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Short }}))
1617
{{ end }}
1718
{{ end -}}
1819
{{ end -}}
@@ -24,7 +25,8 @@ All notable changes to this project will be documented in this file.
2425
{{ range .CommitGroups -}}
2526
### {{ .Title }}
2627
{{ range .Commits -}}
27-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
28+
29+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} ([{{ .Hash.Short }}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Short }}))
2830
{{ end }}
2931
{{ end -}}
3032

.chglog/config.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
style: github
2+
# https://github.com/garden-io/garden/tree/main/.chglog
3+
# https://github.com/git-chglog/git-chglog
4+
# https://github.com/quay/clair/tree/main/.chglog
25
template: CHANGELOG.tpl.md
36
info:
47
title: CHANGELOG
58
repository_url: https://github.com/guanguans/notify
69
options:
10+
sort: semver
711
commits:
12+
sort_by: Scope
813
filters:
914
Type:
1015
- build
@@ -19,20 +24,53 @@ options:
1924
- style
2025
- test
2126
commit_groups:
27+
group_by: Type
28+
sort_by: Custom
29+
title_order:
30+
# https://github.com/fobgochod/git-commit-message-format/blob/main/src/main/resources/messages/GitBundle.properties#L37
31+
- feat
32+
- fix
33+
- docs
34+
- style
35+
- refactor
36+
- perf
37+
- test
38+
- build
39+
- ci
40+
- chore
41+
- revert
2242
title_maps:
23-
chore: Chores
24-
ci: CI
25-
feat: Features
26-
fix: Bug Fixes
27-
perf: Performance Improvements
28-
refactor: Code Refactoring
29-
test: Tests
43+
# https://github.com/antfu/changelogithub/blob/main/src/config.ts
44+
# https://github.com/unjs/changelogen/blob/main/src/config.ts
45+
# https://gitmoji.dev/
46+
build: 📦 Builds
47+
chore: 🏡 Chores
48+
ci: 🤖 Continuous Integrations
49+
docs: 📖 Documents
50+
feat: ✨ Features # 🚀 Enhancements
51+
fix: 🐞 Bug Fixes
52+
perf: 🏎 Performance Improvements
53+
refactor: 💅 Code Refactorings
54+
revert: ⏪️ Reverts
55+
style: 🎨 Styles
56+
test: ✅ Tests
57+
58+
examples: 🏀 Examples
59+
types: 🌊 Types
3060
header:
3161
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
3262
pattern_maps:
3363
- Type
3464
- Scope
3565
- Subject
66+
issues:
67+
prefix:
68+
- "#"
69+
refs:
70+
actions:
71+
- Closes
72+
- Fixes
73+
- PullRequest
3674
notes:
3775
keywords:
3876
- BREAKING CHANGE

.github/ISSUE_TEMPLATE/bug.yml renamed to .github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Bug Report
2+
# https://github.com/spatie/package-skeleton-php/tree/main/.github/ISSUE_TEMPLATE
23
description: Report an Issue or Bug with the Package
34
title: "[Bug]: "
45
labels: [ "bug" ]
@@ -63,4 +64,4 @@ body:
6364
label: Notes
6465
description: Use this field to provide any other notes that you feel might be relevant to the issue.
6566
validations:
66-
required: false
67+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
blank_issues_enabled: false
2+
# https://github.com/spatie/package-skeleton-php/tree/main/.github/ISSUE_TEMPLATE
23
contact_links:
34
- name: Ask a question
45
url: https://github.com/guanguans/notify/discussions/new?category=q-a
@@ -8,4 +9,4 @@ contact_links:
89
about: Share ideas for new features
910
- name: Report a security issue
1011
url: https://github.com/guanguans/notify/security/policy
11-
about: Learn how to notify us for sensitive bugs
12+
about: Learn how to notify us for sensitive bugs
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 🚀 New feature proposal
2+
# https://github.com/antfu/.github/tree/main/.github/ISSUE_TEMPLATE
3+
description: Propose a new feature
4+
labels: [ enhancement ]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for your interest in the project and taking the time to fill out this feature report!
10+
- type: textarea
11+
id: feature-description
12+
attributes:
13+
label: Clear and concise description of the problem
14+
description: 'As a developer using this project I want [goal / wish] so that [benefit]. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: suggested-solution
19+
attributes:
20+
label: Suggested solution
21+
description: 'In module [xy] we could provide following implementation...'
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: alternative
26+
attributes:
27+
label: Alternative
28+
description: Clear and concise description of any alternative solutions or features you've considered.
29+
- type: textarea
30+
id: additional-context
31+
attributes:
32+
label: Additional context
33+
description: Any other context or screenshots about the feature request here.
34+
- type: checkboxes
35+
id: checkboxes
36+
attributes:
37+
label: Validations
38+
description: Before submitting the issue, please make sure you do the following
39+
options:
40+
- label: Follow our [Code of Conduct](https://github.com/guanguans/notify/blob/master/.github/CODE_OF_CONDUCT.md)
41+
required: true
42+
- label: Read the [Contributing Guide](https://github.com/guanguans/notify/blob/master/.github/CONTRIBUTING.md).
43+
required: true
44+
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
45+
required: true

.github/ISSUE_TEMPLATE/typo.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 👀 Typo / Grammar fix
2+
# https://github.com/antfu/.github/tree/main/.github/ISSUE_TEMPLATE
3+
description: You can just go ahead and send a PR! Thank you!
4+
labels: [ ]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## PR Welcome!
10+
11+
If the typo / grammar issue is trivial and straightforward, you can help by **directly sending a quick pull request**!
12+
If you spot multiple of them, we suggest combining them into a single PR. Thanks!
13+
- type: textarea
14+
id: context
15+
attributes:
16+
label: Additional context

.github/workflows/secret-check.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: secrets check
22

3-
on: [ workflow_dispatch, push ]
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
47

58
jobs:
69
security-check:
@@ -9,12 +12,13 @@ jobs:
912
- name: Checkout code
1013
uses: actions/checkout@v4
1114
with:
12-
# ref: ${{ github.ref_name }}
15+
# ref: ${{ github.ref_name }}
1316
fetch-depth: 0
14-
- name: TruffleHog OSS
15-
uses: trufflesecurity/trufflehog@v3.88.30
17+
- name: Secret Scanning
18+
uses: trufflesecurity/trufflehog@main
1619
with:
17-
# path: ./
18-
# base: ${{ github.event.repository.default_branch }}
19-
# head: ${{ github.ref_name }}
20-
extra_args: --debug --only-verified
20+
# path: ./
21+
# base: ${{ github.event.repository.default_branch }}
22+
# head: ${{ github.ref_name }}
23+
# extra_args: --results=verified,unknown --only-verified --debug
24+
extra_args: --results=verified,unknown

0 commit comments

Comments
 (0)