You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ci): Add release-please automation with VERSION (#2622)
* Add VERSION file that Zephyr will pick up
* Add release-please automation
* Updated docs on commits messages, and PR process
* Updated PR template to match.
---
Release-As: 0.1.0
Co-authored-by: Cem Aksoylar <[email protected]>
<!--If you're adding a board/shield please fill out this check-list, otherwise you can delete it-->
1
+
<!--Note: ZMK is generally not accepting PRs for new keyboards. New generic controller PRs *may* still be accepted, please discuss on the Discord server first.-->
2
2
3
-
## Board/Shield Check-list
3
+
## PR check-list
4
4
5
-
-[ ] This board/shield is tested working on real hardware
6
-
-[ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
7
-
-[ ]`.zmk.yml` metadata file added
5
+
-[ ] Branch has a [clean commit history](https://zmk.dev/docs/development/contributing/pull-requests#clean-commit-history)
6
+
-[ ] Additional tests are included, if changing behaviors/core code that is testable.
8
7
-[ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
9
-
-[ ] General consistent formatting of DeviceTree files
10
-
-[ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
11
-
-[ ]`&pro_micro` used in favor of `&pro_micro_d/a` if applicable
12
-
-[ ] If split, no name added for the right/peripheral half
13
-
-[ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol
14
-
-[ ]`.conf` file has optional extra features commented out
15
-
-[ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
8
+
-[ ][Pre-commit](https://zmk.dev/docs/development/local-toolchain/pre-commit) used to check formatting of files, commit messages, etc.
Copy file name to clipboardExpand all lines: docs/docs/development/contributing/pull-requests.md
+39-6Lines changed: 39 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,26 @@
1
1
---
2
-
title: Commit Messages
2
+
title: Pull Requests
3
3
---
4
4
5
+
Changes to ZMK's `main` branch are all done through pull requests, even for core committers. The following will help ensure an easier PR/review process for all involved.
6
+
7
+
## Clean Commit History
8
+
9
+
Before opening a PR, ensure your branch has a clean commit history, which allows our release automation to generate clean changelogs, and allows easier understanding of our commit history when investigating regressions, etc.
- The sequence of commits should be well organized, with discrete commits used to break any combined work into smaller, cohesive changes if the scope of a given PR/change is larger. This allows for easier code review. You can usually accomplish this by amending (e.g. `git add foo && git commit --amend`) or by interactive rebasing (e.g. `git rebase -i upstream/main`) and squashing/rewording commits.
15
+
- Do not use merge commits to catch up with ZMK `main`, instead using rebasing to address any issues with divergence (e.g. `git rebase upstream/main`).
16
+
17
+
### Commit Messages
18
+
5
19
The ZMK project uses [conventional commits](https://www.conventionalcommits.org/) for their commit messages. This not only provides consistency for our commits, but also allows for release/versioning automation to determine the next version to release, generating changelogs, etc.
6
20
7
21
Commit messages will be checked as part of our CI process by GitHub Actions.
8
22
9
-
## Guidelines
23
+
####Guidelines
10
24
11
25
Commits should have the following:
12
26
@@ -16,7 +30,7 @@ Commits should have the following:
16
30
- A body that provides more detail of the changes. This _may_ be a bulleted list or paragraph prose.
17
31
- An optional set of [git trailers](https://git-scm.com/docs/git-interpret-trailers#_description) for things like [GitHub keywords](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) following a blank line.
18
32
19
-
## Example
33
+
####Example
20
34
21
35
Here is an example of a good commit message:
22
36
@@ -34,11 +48,11 @@ Other layouts exist, such as "southpaw" horizontally mirrored layouts,
34
48
and layouts with a fifth column, but those seem to be much less common.
35
49
```
36
50
37
-
## Pre-Commit
51
+
####Pre-Commit
38
52
39
53
To help make sure you don't need to wait for GitHub Actions to check your commits, you can [set up pre-commit](../local-toolchain/pre-commit.md) to check your commits as you create them.
40
54
41
-
## Types
55
+
####Types
42
56
43
57
The following commit types are used by ZMK:
44
58
@@ -51,7 +65,7 @@ The following commit types are used by ZMK:
51
65
-`ci:` -- changes to our continuous integration setup with GitHub Actions, usually only for the files in `.github/workflows/`
52
66
-`chore:` -- grab bag type for small changes that don't fall into any of the above categories, including dependency updates for development tools and docs.
53
67
54
-
## Scopes
68
+
####Scopes
55
69
56
70
The following scopes are frequently used to further clarify the scope of the change:
57
71
@@ -68,3 +82,22 @@ The following scopes are frequently used to further clarify the scope of the cha
68
82
-`core` -- changes to any other area of our core code
69
83
-`boards` -- changes to the in-tree boards
70
84
-`shields` -- changes to the in-tree shields
85
+
86
+
## Opening a PR
87
+
88
+
Create a PR by visiting https://github.com/zmkfirmware/zmk/pulls and clicking "New pull request" and selecting your branch. GitHub should auto-populate a start of a description/body to your PR, but please make sure to supplement that with additional details about the change and make sure the check-list is complete in the PR template.
89
+
90
+
Once created, the PR should automatically have reviewers assigned.
91
+
92
+
## Review
93
+
94
+
Depending on the area of change, different ZMK team members will review the PR. The ZMK project is a small team, so please be patient with the review timeline. You are welcome to send a polite request/nudge on our Discord server to draw attention to your PR if it has not gotten a response after a reasonable amount of time.
95
+
96
+
## Merging
97
+
98
+
Maintainers merging PRs will perform the following steps:
99
+
100
+
1. Verify that the expected tests have all run, and are passing
101
+
1. Inspect the commits in the PR to confirm the commit messages not only are proper conventional commits, but have accurate descriptions and are using the correct type for the set of files changed by the commit(s).
102
+
1. Merge the PR using a squash-merge. If the PR includes multiple commits, then the squash message will be fixed up manually to remove the `* ` prefixes from each message section to ensure [release-please](https://github.com/googleapis/release-please) properly will parse the compound commit message.
103
+
1. Confirm the new/existing release PR is updated properly with the expected version number and changelog.
0 commit comments