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

ci: add job to enforce updates to the changelog #483

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
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
28 changes: 28 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Pull Request Workflow"
on:
merge_group:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

env:
PR_URL: https://github.com/Layr-Labs/eigensdk-rs/pull/${{ github.event.number }}

jobs:
# Enforces the update of a changelog file on every pull request
# The update in the changelog can be skipped if the pull request
# includes the `changelog-ignore` label.
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check CHANGELOG.md is updated
uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: changelog-ignore

- name: Check the PR URL is included in CHANGELOG.md
if: contains(github.event.pull_request.labels.*.name, 'changelog-ignore') == false
run: git diff CHANGELOG.md | grep $PR_URL CHANGELOG.md
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Each version will have a separate `Breaking Changes` section as well. To describe in how to upgrade from one version to another if needed

## [Unreleased]
### Added
### Changed
### Breaking changes
### Removed