Skip to content

Commit edb60c6

Browse files
committed
chore: add .github folder with initial files
1 parent 4ae7008 commit edb60c6

File tree

8 files changed

+186
-0
lines changed

8 files changed

+186
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @BlessInSoftware/ZeroDay

.github/COMMIT_CONVENTION.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Git conventional commit messages
2+
3+
> Note
4+
> This is adapted from [Discord.js commit convention](https://github.com/discordjs/discord.js/blob/main/.github/COMMIT_CONVENTION.md) and [Conventional commits](https://www.conventionalcommits.org).
5+
6+
## TL;DR
7+
8+
Messages must be matched by the following regex:
9+
10+
```js
11+
/^(revert: )?(feat(\(.+\))?:|fix(\(.+\))?:|docs(\(.+\))?:|style(\(.+\))?:|refactor(\(.+\))?:|perf(\(.+\))?:|test(\(.+\))?:|build(\(.+\))?:|ci(\(.+\))?:|chore(\(.+\))?:) .{1,72}/;
12+
```
13+
14+
### Examples
15+
16+
Appears under "features" header, `scope` subheader:
17+
18+
```text
19+
feat(scope): add 'tag' method
20+
```
21+
22+
Appears under "fixes" header, `scope` subheader, with a link to issue #1:
23+
24+
```text
25+
fix(scope): handle events correctly
26+
27+
close #1
28+
```
29+
30+
Appears under "performance" header, and under "Breaking Changes" with the breaking change explanation:
31+
32+
```text
33+
perf(core)!: improve patching by removing 'bar' option
34+
35+
BREAKING CHANGE: The 'bar' option has been removed.
36+
```
37+
38+
The following commit and commit `410fbbc` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
39+
40+
```text
41+
revert: feat(Managers): add Managers
42+
43+
This reverts commit 410fbbc5c4d0072b9bb97a466f56b07c90b926be.
44+
```
45+
46+
### Full Message Format
47+
48+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
49+
50+
```text
51+
<type>(<scope>): <subject>
52+
<BLANK LINE>
53+
<body>
54+
<BLANK LINE>
55+
<footer>
56+
```
57+
58+
> **Note**
59+
> The **header** is mandatory and the **scope** of the header is optional.
60+
> If you aren't using it, it should look like this: `<type>: <subject>`
61+
62+
### Revert
63+
64+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
65+
66+
### Type
67+
68+
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
69+
70+
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
71+
72+
### Scope
73+
74+
The scope could be anything specifying the place of the commit change. For example `Object`, `Array`, `Class` etc.
75+
76+
### Subject
77+
78+
The subject contains a succinct description of the change:
79+
80+
- use the imperative, present tense: "change" not "changed" nor "changes"
81+
- don't capitalize the first letter
82+
- no dot (.) at the end
83+
84+
### Body
85+
86+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
87+
The body should include the motivation for the change and contrast this with previous behavior.
88+
89+
### Footer
90+
91+
The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**.
92+
93+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [IvanGodinez21]

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Bug
2+
title: '[Bug]: '
3+
description: Template for discovered bugs.
4+
labels: [bug]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Description
10+
description: A clear and concise description of what the problem is, or what feature you want to be implemented.
11+
placeholder: Describe the bug.
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: solution
16+
attributes:
17+
label: Ideal solution or implementation
18+
description: A clear and concise description of what you want to happen.
19+
placeholder: Describe a possible solution.
20+
validations:
21+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Feature
2+
title: '[Feature]: '
3+
description: Template for new features.
4+
labels: [enhancement]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Description
10+
description: A detailed description for this issue, provide all necessary information so any member of the project understands. You can describe or use the following template -> As a `<type of user>`, I want `<some goal>` so that `<some reason>`.
11+
placeholder: Describe the feature.
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: design
16+
attributes:
17+
label: Design
18+
description: Provide references to images of the design, how it looks now, and how it should look like.
19+
placeholder: Attach images or links to images.
20+
validations:
21+
required: false

.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+
> Describe the changes made by this pull request.
4+
5+
## Related issues
6+
7+
> List related issues (if any) and/or @mentions of the person or team responsible for reviewing proposed changes (left blank if not applicable).
8+
> List by using - [ ] and the issue number, e.g. `- [ ] #1` or `- [x] #1` if the issue is closed/solved.
9+
10+
## Testing
11+
12+
> Help me how can I test or look at the changes (left blank if not applicable).
13+
14+
## Screenshots
15+
16+
> Include screenshots of the results or screenshots that help to see changes (left blank if not applicable).
17+
18+
## Notes
19+
20+
> Some additional notes if necessary (left blank if not applicable).

.github/workflows/coverage.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Coverage
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
jobs:
9+
collect-and-upload-coverage:
10+
name: Run tests, collect and upload coverage
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 🏗️ Setup repository
14+
uses: actions/checkout@v3
15+
16+
- name: 🏗️ Setup Bun
17+
uses: oven-sh/setup-bun@v1
18+
19+
- name: 📦 Install dependencies
20+
run: bun install
21+
22+
- name: 🧪 Run tests and collect coverage
23+
run: bun test --coverage
24+
25+
- name: 📤 Upload coverage to Codacy
26+
uses: codacy/codacy-coverage-reporter-action@v1.3.0
27+
with:
28+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}

0 commit comments

Comments
 (0)