From e3f50a822bae2fb95e072dd2f1e1fd615849b65c Mon Sep 17 00:00:00 2001 From: Yang Libin Date: Wed, 6 Sep 2023 03:00:00 +0000 Subject: [PATCH 1/2] chore: upgrade workflows --- .github/workflows/black-lint.yml | 2 +- .github/workflows/clang-format-lint.yml | 25 +++++-------------------- .github/workflows/compress.yml | 2 +- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/black-lint.yml b/.github/workflows/black-lint.yml index d38f6ee285563..7bf39246d8169 100644 --- a/.github/workflows/black-lint.yml +++ b/.github/workflows/black-lint.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: jpetrucciani/black-check@master with: black_flags: '-S' diff --git a/.github/workflows/clang-format-lint.yml b/.github/workflows/clang-format-lint.yml index 66d906392db66..a7a6cdc75cbf4 100644 --- a/.github/workflows/clang-format-lint.yml +++ b/.github/workflows/clang-format-lint.yml @@ -1,32 +1,17 @@ name: clang-format-linter on: - pull_request_target: - types: - - opened - - edited - - synchronize - branches: - - main + push: {} + pull_request: {} jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - uses: DoozyX/clang-format-lint-action@v0.13 + - uses: actions/checkout@v4 + - uses: DoozyX/clang-format-lint-action@v0.16.2 with: source: '.' extensions: 'c,cpp,java' - clangFormatVersion: 12 - inplace: True - - - uses: EndBug/add-and-commit@v9 - with: - committer_name: yanglbme - committer_email: contact@yanglibin.info - message: 'chore: format code with clang-format' - env: - GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} \ No newline at end of file + clangFormatVersion: 16 \ No newline at end of file diff --git a/.github/workflows/compress.yml b/.github/workflows/compress.yml index 10a3e3012e3c9..e15f80678711f 100644 --- a/.github/workflows/compress.yml +++ b/.github/workflows/compress.yml @@ -29,7 +29,7 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository) steps: - name: Checkout Branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compress Images id: calibre uses: calibreapp/image-actions@main From d4aad7d7a6e6e10a2410ff582aa9359356cf6c22 Mon Sep 17 00:00:00 2001 From: Yang Libin Date: Wed, 6 Sep 2023 03:03:26 +0000 Subject: [PATCH 2/2] fix: style --- solution/0400-0499/0449.Serialize and Deserialize BST/README.md | 1 - .../0400-0499/0449.Serialize and Deserialize BST/README_EN.md | 1 - .../0400-0499/0449.Serialize and Deserialize BST/Solution.cpp | 1 - 3 files changed, 3 deletions(-) diff --git a/solution/0400-0499/0449.Serialize and Deserialize BST/README.md b/solution/0400-0499/0449.Serialize and Deserialize BST/README.md index aad8a78873dbb..4689bc07f056f 100644 --- a/solution/0400-0499/0449.Serialize and Deserialize BST/README.md +++ b/solution/0400-0499/0449.Serialize and Deserialize BST/README.md @@ -191,7 +191,6 @@ public class Codec { */ class Codec { public: - // Encodes a tree to a single string. string serialize(TreeNode* root) { if (!root) { diff --git a/solution/0400-0499/0449.Serialize and Deserialize BST/README_EN.md b/solution/0400-0499/0449.Serialize and Deserialize BST/README_EN.md index 92f6f8eb52cdd..6aa7670be348a 100644 --- a/solution/0400-0499/0449.Serialize and Deserialize BST/README_EN.md +++ b/solution/0400-0499/0449.Serialize and Deserialize BST/README_EN.md @@ -166,7 +166,6 @@ public class Codec { */ class Codec { public: - // Encodes a tree to a single string. string serialize(TreeNode* root) { if (!root) { diff --git a/solution/0400-0499/0449.Serialize and Deserialize BST/Solution.cpp b/solution/0400-0499/0449.Serialize and Deserialize BST/Solution.cpp index 5a11f400c957d..7c22f45ed5920 100644 --- a/solution/0400-0499/0449.Serialize and Deserialize BST/Solution.cpp +++ b/solution/0400-0499/0449.Serialize and Deserialize BST/Solution.cpp @@ -9,7 +9,6 @@ */ class Codec { public: - // Encodes a tree to a single string. string serialize(TreeNode* root) { if (!root) {