Skip to content

Commit d55b782

Browse files
dignifiedquireArqu
andauthored
docs: improve breaking change handling (#2207)
- update issue template - update `CONTRIBUTING.md` - add semver checker to CI --------- Co-authored-by: Asmir Avdicevic <asmir.avdicevic64@gmail.com>
1 parent 0f624cc commit d55b782

File tree

4 files changed

+44
-4
lines changed

4 files changed

+44
-4
lines changed

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
<!-- A summary of what this pull request achieves and a rough list of changes. -->
44

5+
## Breaking Changes
6+
7+
<!-- Optional, if there are any breaking changes document them, including how to migrate older code. -->
8+
59
## Notes & open questions
610

711
<!-- Any notes, remarks or open questions you have to make about the PR. -->
@@ -11,3 +15,4 @@
1115
- [ ] Self-review.
1216
- [ ] Documentation updates if relevant.
1317
- [ ] Tests if relevant.
18+
- [ ] All breaking changes documented.

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,32 @@ jobs:
7272
env:
7373
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG' }}
7474

75+
76+
check_semver:
77+
runs-on: ubuntu-latest
78+
env:
79+
RUSTC_WRAPPER: "sccache"
80+
SCCACHE_GHA_ENABLED: "on"
81+
steps:
82+
- uses: actions/checkout@v4
83+
with:
84+
fetch-depth: 0
85+
- name: Install sccache
86+
uses: mozilla-actions/sccache-action@v0.0.4
87+
88+
- name: Setup Environment (PR)
89+
if: ${{ github.event_name == 'pull_request' }}
90+
shell: bash
91+
run: |
92+
echo "HEAD_COMMIT_SHA=$(git rev-parse origin/${{ github.base_ref }})" >> ${GITHUB_ENV}
93+
- name: Check semver
94+
# uses: obi1kenobi/cargo-semver-checks-action@v2
95+
uses: n0-computer/cargo-semver-checks-action@feat-baseline
96+
with:
97+
package: iroh, iroh-base, iroh-bytes, iroh-cli, iroh-dns-server, iroh-gossip, iroh-metrics, iroh-net, iroh-sync
98+
baseline-rev: ${{ env.HEAD_COMMIT_SHA }}
99+
use-cache: false
100+
75101
check_fmt_and_docs:
76102
timeout-minutes: 30
77103
name: Checking fmt and docs

.github/workflows/commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ jobs:
1212
- name: check-for-cc
1313
id: check-for-cc
1414
uses: agenthunt/conventional-commit-checker-action@v1.0.0
15+
with:
16+
pr-title-regex: "^(.+)(?:(([^)s]+)))?!?: (.+)"

CONTRIBUTING.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Here are some of the ways in which you can contribute:
88

99
## Discussions
1010

11-
If you want to ask a question to understand a concept regarding Iroh, or need help working with Iroh, please check the [Discussions][discussions]. If you don't find a thread that fits your needs, feel free to create a new one.
11+
If you want to ask a question to understand a concept regarding Iroh, or need help working with Iroh, please check the [Discussions][discussions]. If you don't find a thread that fits your needs, feel free to create a new one.
1212

1313
## Issues
1414

@@ -21,7 +21,7 @@ If you would like to suggest a new feature in Iroh, [create a new issue][newissu
2121
Code contributions to Iroh are greatly appreciated. Here is the general workflow you should follow:
2222

2323
1. **State in the associated issue your desire to work on it**
24-
24+
2525
If there is no issue for the work you would like to do, please open one. This helps reduce duplicated efforts and give contributors the help and guidance they might need.
2626

2727
2. **Write some code!**
@@ -38,7 +38,7 @@ Code contributions to Iroh are greatly appreciated. Here is the general workflow
3838
- Comment your code. It will be useful for your reviewer and future contributors.
3939

4040
- **Pull request titles**
41-
41+
4242
- Iroh pull requests titles look like this: `type(crate): description`
4343

4444
| **`type`** | **When to use** |
@@ -52,11 +52,13 @@ Code contributions to Iroh are greatly appreciated. Here is the general workflow
5252
| `deps` | Dependency only updates |
5353
| `chore` | Changes to the build process or auxiliary tools and libraries |
5454

55-
55+
5656
**`crate`** is the rust crate containing your changes.
5757

5858
**`description`** is a short sentence that summarizes your changes.
5959

60+
If there is a breaking change please use a `!` in the commit message to denote this, eg. `feat(iroh)!: break the world`.
61+
6062
- **Pull request descriptions**
6163

6264
Once you open a pull request, you will be prompted to follow a template with three simple parts:
@@ -65,6 +67,10 @@ Code contributions to Iroh are greatly appreciated. Here is the general workflow
6567

6668
A summary of what your pull request achieves and a rough list of changes.
6769

70+
- **Breaking Changes**
71+
72+
Optional, if there are any breaking changes document them, including how to migrate older code.
73+
6874
- **Notes & open questions**
6975

7076
Notes, open questions and remarks about your changes.
@@ -74,6 +80,7 @@ Code contributions to Iroh are greatly appreciated. Here is the general workflow
7480
- **Self review**: We ask you to thoroughly review your changes until you are happy with them. This helps speed up the review process.
7581
- **Add documentation**: If your change requires documentation updates, make sure they are properly added.
7682
- **Tests**: If your code creates a new feature, when possible add tests for this. If they fix a bug, a regression test is recommended as well.
83+
- **Breaking Changes**: All breaking changes need to be documented.
7784

7885

7986
4. **Review process**

0 commit comments

Comments
 (0)