summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-05-25 11:17:57 +0800
committerGitHub <noreply@github.com>2024-05-25 11:17:57 +0800
commitb79a66871a0301e7d326d80f98f4a426dd34e926 (patch)
tree82df8982e2e7d3e7735ff4b6d1bc5ac8e2736200
parent87abc4245f2a24e1cc35851b6464af9588934286 (diff)
parent75ed0bfacfee29f54cdab6b1218f0e48677a1fe6 (diff)
downloadlua-language-server-b79a66871a0301e7d326d80f98f4a426dd34e926.zip
Merge pull request #2675 from carsakiller/log-changes
add: workflow to assert changelog updates
-rwxr-xr-x.github/scripts/check-changelog.sh17
-rw-r--r--.github/workflows/changelog.yml24
-rw-r--r--changelog.md5
3 files changed, 45 insertions, 1 deletions
diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh
new file mode 100755
index 00000000..ae3b8b11
--- /dev/null
+++ b/.github/scripts/check-changelog.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+CHANGELOG_FILE="changelog.md"
+
+git fetch origin $GITHUB_BASE_REF
+git fetch
+
+# Check if the changelog file was modified in the PR
+if git diff --name-only origin/$GITHUB_BASE_REF..remotes/pull/$GITHUB_SOURCE_REF | grep -q $CHANGELOG_FILE; then
+ echo "Thank you for updating the changelog!"
+ exit 0
+else
+ echo "Changelog has not been updated. Please update $CHANGELOG_FILE!"
+ exit 1
+fi
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
new file mode 100644
index 00000000..b3995e05
--- /dev/null
+++ b/.github/workflows/changelog.yml
@@ -0,0 +1,24 @@
+name: changelog
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+ branches:
+ - master
+
+jobs:
+ check-changelog:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Set up environment
+ run: |
+ echo "GITHUB_SOURCE_REF=${{ github.ref_name }}" >> $GITHUB_ENV
+ echo "GITHUB_BASE_REF=${{ github.base_ref }}" >> $GITHUB_ENV
+
+ - name: Check if changelog is updated
+ run: .github/scripts/check-changelog.sh
diff --git a/changelog.md b/changelog.md
index 85c073d7..62ca8974 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,8 @@
# changelog
+## Unreleased
+<!-- Add all new changes here. They will be moved under a version at release -->
+
## 3.9.0
`2024-5-11`
* `NEW` goto implementation
@@ -123,7 +126,7 @@
Cat = 1,
Dog = 2,
}
-
+
---@param animal userdata
---@param atp AnimalType
---@return boolean