Skip to content

Commit

Permalink
chore(changelog): reusable workflow / simpler changelog file format (#…
Browse files Browse the repository at this point in the history
…11668)

* chore(changelog): use reusable changelog workflow (#11549)

This avoids code duplication and makes improvements on changelog generation/format easier.

* chore(changelog): use simpler format for changelog files with the new (#11652)

changelog generator

The new changelog generator removes the need to write down jiras or prs manually. Now these are automatically extracted by the script and these fields are no longer needed.

Also, we changed the file extension to .yml to stay consistent with the rest of the repository.

Existing changelogs were modified automatically using yq to remove these fields that are no longer needed. This will be eventually backported to all branches that currently uses the new changelog generator.

KAG-2545

---------

Co-authored-by: Yusheng Li <leeys.top@gmail.com>
Co-authored-by: Datong Sun <datong.sun@konghq.com>
  • Loading branch information
3 people authored Sep 27, 2023
1 parent c666b5e commit 85638b5
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 20 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/changelog-requirement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Changelog Requirement

on:
pull_request:
types: [ opened, synchronize, labeled, unlabeled ]
paths:
- 'kong/**'
- '**.rockspec'
- '.requirements'

jobs:
require-changelog:
if: ${{ !contains(github.event.*.labels.*.name, 'skip-changelog') }}
name: Requires changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: computes changed files
id: changelog-check
uses: tj-actions/changed-files@2f7246cb26e8bb6709b6cbfc1fec7febfe82e96a # v37
with:
files: 'changelog/unreleased/**/*.yml'

- name: asserts changelog added
run: >
if [ "${{ steps.changelog-check.outputs.added_files_count }}" = "0" ]; then
echo "Should contain at least one changelog file in changelog/unreleased/*/ directory"
exit 1
fi
17 changes: 17 additions & 0 deletions .github/workflows/changelog-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Changelog Validation

on:
pull_request:
types: [ opened, synchronize ]

jobs:
validate-changelog:
name: Validate changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate changelogs
uses: Kong/gateway-changelog@main
with:
files: changelog/unreleased/*/*.yml
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
message: Fix a problem that abnormal socket connection will be reused when querying Postgres database.
type: bugfix
scope: Core
prs:
- 11480
jiras:
- "FTI-5322"
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
message: "Tracing: fix an issue that resulted in some parent spans to end before their children due to different precision of their timestamps"
type: bugfix
scope: PDK
prs:
- 11484
jiras:
- "KAG-2336"
issues:
- 11294
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
message: Fix upstream ssl failure when plugins use response handler
type: bugfix
scope: Core
prs:
- 11502
jiras:
- "FTI-5347"
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
message: Fix an issue that protocol `tls_passthrough` can not work with expressions flavor
type: bugfix
scope: Core
prs:
- 11538
jiras:
- "KAG-2561"
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
message: "Fix incorrect LuaJIT LDP/STP fusion on ARM64 which may sometimes cause incorrect logic"
type: dependency
scope: Core
prs:
- 11537
jiras:
- "KAG-2473"
3 changes: 3 additions & 0 deletions changelog/changelog-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message:
type:
prs:
Empty file.
File renamed without changes.

1 comment on commit 85638b5

@khcp-gha-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:85638b5788538a59596c7a90aeb8867a92309dca
Artifacts available https://github.com/Kong/kong/actions/runs/6391798935

Please sign in to comment.