From e0a376ab0377ec86eba6aa42e5f32efa44cac17b Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 07:38:16 +0000 Subject: add: workflow to assert changelog updates --- .github/scripts/check-changelog.sh | 16 ++++++++++++++++ .github/workflows/changelog.yml | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 .github/scripts/check-changelog.sh create mode 100644 .github/workflows/changelog.yml diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh new file mode 100755 index 00000000..8484a386 --- /dev/null +++ b/.github/scripts/check-changelog.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +CHANGELOG_FILE="changelog.md" + +git fetch + +# Check if the changelog file was modified in the PR +if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_HEAD_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..ccf93645 --- /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 # Need entire git history + + - name: Set up environment + run: | + echo "GITHUB_HEAD_REF=${{ github.head_ref }}" >> $GITHUB_ENV + echo "GITHUB_BASE_REF=${{ github.base_ref }}" >> $GITHUB_ENV + + - name: Check if changelog is updated + run: .github/scripts/check-changelog.sh -- cgit v1.2.3 From fc3a8b2d2b3afb10b5d2f0badbe2301058e0b9d9 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:02:00 +0000 Subject: fix: fetch --- .github/scripts/check-changelog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index 8484a386..8d4ac0df 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -4,7 +4,7 @@ set -e CHANGELOG_FILE="changelog.md" -git fetch +git fetch origin $GITHUB_BASE_REF # Check if the changelog file was modified in the PR if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_HEAD_REF | grep -q $CHANGELOG_FILE; then -- cgit v1.2.3 From c026bebe6ed1c9d89aaaa9493d62cacd98af6d4a Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:08:01 +0000 Subject: fetch again? --- .github/scripts/check-changelog.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index 8d4ac0df..af39a4da 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -5,6 +5,7 @@ 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..$GITHUB_HEAD_REF | grep -q $CHANGELOG_FILE; then -- cgit v1.2.3 From d57084e877582817de8b0545d0f70ff0e86a3bf8 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:12:18 +0000 Subject: add: logging --- .github/scripts/check-changelog.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index af39a4da..876d74f1 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -4,8 +4,12 @@ set -e CHANGELOG_FILE="changelog.md" + git fetch origin $GITHUB_BASE_REF -git fetch +git fetch --unshallow + +echo $(git remote) +echo $(git branch) # Check if the changelog file was modified in the PR if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_HEAD_REF | grep -q $CHANGELOG_FILE; then -- cgit v1.2.3 From 3448f5e44c0fd9dbf15ebbbbae6994b9973a31ab Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:13:16 +0000 Subject: un-unshallow --- .github/scripts/check-changelog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index 876d74f1..aeec5aa1 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -6,7 +6,7 @@ CHANGELOG_FILE="changelog.md" git fetch origin $GITHUB_BASE_REF -git fetch --unshallow +git fetch echo $(git remote) echo $(git branch) -- cgit v1.2.3 From 5a97a63cf7c607c4bce4f5e56732a44451e73e1a Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:19:08 +0000 Subject: don't fetch as deep --- .github/scripts/check-changelog.sh | 3 +-- .github/workflows/changelog.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index aeec5aa1..32489144 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -8,8 +8,7 @@ CHANGELOG_FILE="changelog.md" git fetch origin $GITHUB_BASE_REF git fetch -echo $(git remote) -echo $(git branch) +echo $(git branch -a) # Check if the changelog file was modified in the PR if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_HEAD_REF | grep -q $CHANGELOG_FILE; then diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ccf93645..0f6a0dc4 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 0 # Need entire git history + fetch-depth: 2 - name: Set up environment run: | -- cgit v1.2.3 From 503da3b4c073573ce89f706debebd12a8a5abf98 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:27:10 +0000 Subject: or ref name --- .github/workflows/changelog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 0f6a0dc4..9ed6968e 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -13,11 +13,11 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 2 + fetch-depth: 0 - name: Set up environment run: | - echo "GITHUB_HEAD_REF=${{ github.head_ref }}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{ github.head_ref || github.ref_name }}" >> $GITHUB_ENV echo "GITHUB_BASE_REF=${{ github.base_ref }}" >> $GITHUB_ENV - name: Check if changelog is updated -- cgit v1.2.3 From 047c3a277ebdbbd5e67fae764d2d626df698e8b5 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:28:42 +0000 Subject: only ref name --- .github/scripts/check-changelog.sh | 2 +- .github/workflows/changelog.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index 32489144..5402f490 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -11,7 +11,7 @@ git fetch echo $(git branch -a) # Check if the changelog file was modified in the PR -if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_HEAD_REF | grep -q $CHANGELOG_FILE; then +if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_SOURCE_REF | grep -q $CHANGELOG_FILE; then echo "Thank you for updating the changelog!" exit 0 else diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 9ed6968e..b3995e05 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -17,7 +17,7 @@ jobs: - name: Set up environment run: | - echo "GITHUB_HEAD_REF=${{ github.head_ref || github.ref_name }}" >> $GITHUB_ENV + echo "GITHUB_SOURCE_REF=${{ github.ref_name }}" >> $GITHUB_ENV echo "GITHUB_BASE_REF=${{ github.base_ref }}" >> $GITHUB_ENV - name: Check if changelog is updated -- cgit v1.2.3 From f6d3af8d34875ce073bb78e2f50bf1bc2b151a87 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:30:05 +0000 Subject: add prefix --- .github/scripts/check-changelog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index 5402f490..d6887bc1 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -11,7 +11,7 @@ git fetch echo $(git branch -a) # Check if the changelog file was modified in the PR -if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_SOURCE_REF | grep -q $CHANGELOG_FILE; then +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 -- cgit v1.2.3 From 75ed0bfacfee29f54cdab6b1218f0e48677a1fe6 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 23 May 2024 08:31:36 +0000 Subject: add: unreleased section to changelog --- .github/scripts/check-changelog.sh | 3 --- changelog.md | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh index d6887bc1..ae3b8b11 100755 --- a/.github/scripts/check-changelog.sh +++ b/.github/scripts/check-changelog.sh @@ -4,12 +4,9 @@ set -e CHANGELOG_FILE="changelog.md" - git fetch origin $GITHUB_BASE_REF git fetch -echo $(git branch -a) - # 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!" diff --git a/changelog.md b/changelog.md index 85c073d7..62ca8974 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## Unreleased + + ## 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 -- cgit v1.2.3 From 1f066995343d974f74541b3777f383f54e104d9a Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Fri, 24 May 2024 09:12:04 -0400 Subject: Bump EmmyLuaCodeStyle --- 3rd/EmmyLuaCodeStyle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rd/EmmyLuaCodeStyle b/3rd/EmmyLuaCodeStyle index 660a2608..025d8987 160000 --- a/3rd/EmmyLuaCodeStyle +++ b/3rd/EmmyLuaCodeStyle @@ -1 +1 @@ -Subproject commit 660a26085ff2c1275392a291063404d54fdd32b9 +Subproject commit 025d89870dbfa9c20c14204f663f0bb6ed8c8fc6 -- cgit v1.2.3 From d8e6d1bd636a1820b2037cdc94137b7e0448a4cb Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Fri, 24 May 2024 09:20:12 -0400 Subject: Add schema link to .luarc.json. --- .luarc.json | 1 + 1 file changed, 1 insertion(+) 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", -- cgit v1.2.3