summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.github/scripts/check-changelog.sh17
-rw-r--r--.github/workflows/changelog.yml24
-rw-r--r--.luarc.json1
-rw-r--r--changelog.md5
4 files changed, 46 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/.luarc.json b/.luarc.json
index fc02379f..7e366901 100644
--- a/.luarc.json
+++ b/.luarc.json
@@ -1,4 +1,5 @@
{
+ "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"diagnostics": {
"disable": [
"close-non-object",
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