Skip to content

Commit

Permalink
ci: ask users to provide towncrier snippet
Browse files Browse the repository at this point in the history
And provide TL;DR documentation.
  • Loading branch information
praiskup committed Feb 13, 2024
1 parent f28e3cd commit 8013cde
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/towncrier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Check that ChangeLog has been modified

on:
pull_request:
branches:
- main

jobs:
changed_files:
runs-on: ubuntu-latest
name: Test that towncrier file exists
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
since_last_remote_commit: true

- name: Detect the missing Release Notes entry
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
status=false
for file in ${ALL_CHANGED_FILES}; do
case $file in
*release-notes-next*)
status=true
;;
esac
done
if $status; then
echo "Thank you for providing the release note snippet!"
else
echo "Please provide release notes snippet, per the instructions"
echo https://rpm-software-management.github.io/mock/Release-Notes-New-Entry
fi
$status
17 changes: 15 additions & 2 deletions docs/Release-Notes-New-Entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,24 @@ layout: default
title: Maintaining ChangeLog
---

# TL;DR - quick start

You typically want to create a markdown snippet with:

$ towncrier create failed-selinux-mountpoint.bugfix
Created news fragment at ./releng/release-notes-next/failed-selinux-mountpoint.bugfix
$ vim ./releng/release-notes-next/failed-selinux-mountpoint.bugfix
... document ...
$ git add ./releng/release-notes-next/failed-selinux-mountpoint.bugfix

Please refer to issues, PRs, bugs, commits using the
`[reference#ID][]` or `[some text][reference#ID]` syntax described below.

# Maintaining ChangeLog

Mock uses the [towncrier](https://github.com/twisted/towncrier) project for
maintaining release notes (aka changelog). For adding new entry, provide a text
file in
maintaining release notes (aka changelog). For adding a new Release Notes
entry, provide a markdown file in the
[releng/release-notes-next](https://github.com/rpm-software-management/mock/tree/main/releng/release-notes-next)
drop-in directory.

Expand Down
File renamed without changes.

0 comments on commit 8013cde

Please sign in to comment.