Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning for CHANGELOG.md #799

Merged
merged 4 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Runs changelog related jobs.
# CI job heavily inspired by: https://github.com/tarides/changelog-check-action

name: changelog

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Check for changes in changelog
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
NO_CHANGELOG_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'no changelog') }}
run: ./scripts/check-changelog.sh "${{ inputs.changelog }}"
shell: bash
36 changes: 18 additions & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:
types: [opened, reopened, synchronize]

jobs:
version:
name: check rust version consistency
clippy:
name: clippy nightly on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
profile: minimal
override: true
- name: check rust versions
run: ./scripts/check-rust-version.sh
- name: Clippy
run: |
rustup update --no-self-update nightly
rustup +nightly component add clippy
make clippy

rustfmt:
name: rustfmt check nightly on ubuntu-latest
Expand All @@ -31,17 +31,6 @@ jobs:
rustup +nightly component add rustfmt
make format-check

clippy:
name: clippy nightly on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Clippy
run: |
rustup update --no-self-update nightly
rustup +nightly component add clippy
make clippy

doc:
name: doc stable on ubuntu-latest
runs-on: ubuntu-latest
Expand All @@ -51,3 +40,14 @@ jobs:
run: |
rustup update --no-self-update
make doc

version:
name: check rust version consistency
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
profile: minimal
override: true
- name: check rust versions
run: ./scripts/check-rust-version.sh
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

## 0.5.0 (TBD)

- [BREAKING] Increase of nonce does not require changes in account state any more (#789).
- Renamed "consumed" and "created" notes into "input" and "output" respectively (#791).
- [BREAKING] Renamed `NoteType::OffChain` into `NoteType::Private`.
- [BREAKING] Renamed public accessors of the `Block` struct to match the updated fields (#791).
- [BREAKING] Changed the `TransactionArgs` to use `AdviceInputs` (#793).
- Setters in `memory` module don't drop the setting `Word` anymore (#795).
- [BREAKING] Increase of nonce does not require changes in account state any more (#789).
- Added `CHANGELOG.md` warning message on CI (#799).

## 0.4.0 (2024-07-03)

Expand Down Expand Up @@ -43,9 +44,9 @@

## 0.3.1 (2024-06-12)

* Replaced `cargo-make` with just `make` for running tasks (#696).
* Made `DataStore` conditionally async using `winter-maybe-async` (#725)
* Fixed `StorageMap`s implementation and included into apply_delta (#745)
- Replaced `cargo-make` with just `make` for running tasks (#696).
- Made `DataStore` conditionally async using `winter-maybe-async` (#725)
- Fixed `StorageMap`s implementation and included into apply_delta (#745)

## 0.3.0 (2024-05-14)

Expand Down
21 changes: 21 additions & 0 deletions scripts/check-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -uo pipefail

CHANGELOG_FILE="${1:-CHANGELOG.md}"

if [ "${NO_CHANGELOG_LABEL}" = "true" ]; then
# 'no changelog' set, so finish successfully
echo "\"no changelog\" label has been set"
exit 0
else
# a changelog check is required
# fail if the diff is empty
if git diff --exit-code "origin/${BASE_REF}" -- "${CHANGELOG_FILE}"; then
>&2 echo "Changes should come with an entry in the \"CHANGELOG.md\" file. This behavior
can be overridden by using the \"no changelog\" label, which is used for changes
that are trivial / explicitely stated not to require a changelog entry."
exit 1
fi

echo "The \"CHANGELOG.md\" file has been updated."
fi
Loading