From fcad9f0d202f6916a0a1128742de35a05f4d1c42 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 26 Sep 2025 11:41:36 +0300 Subject: [PATCH 1/6] feat: add dependabot.yml --- .github/dependabot.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..48afb80 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: "monthly" + groups: + actions: + patterns: + - "*" From d1f224bcdb5e1a12c7090d7f2f40b287d1d60277 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 26 Sep 2025 11:42:45 +0300 Subject: [PATCH 2/6] feat: Create labeler.yml --- .github/workflows/labeler.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/labeler.yml diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..7755837 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,10 @@ +name: PR Autolabeler + +on: + # pull_request event is required for autolabeler + pull_request: + types: [opened, reopened, synchronize] + +jobs: + draft-release: + uses: cpp-linter/.github/.github/workflows/release-drafter.yml@main From 13963ffe2abebaee53a531cb7c241308acd967b0 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 26 Sep 2025 11:43:20 +0300 Subject: [PATCH 3/6] feat: Create stale.yml --- .github/workflows/stale.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..d726f39 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,13 @@ +name: 'Close stale issues' +on: + schedule: + - cron: '30 1 * * *' +permissions: {} + +jobs: + stale: + permissions: + contents: read + issues: write + pull-requests: write + uses: cpp-linter/.github/.github/workflows/stale.yml@main From f961a5813851ee79e695e42f6ac1e1a7f49c8188 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 26 Sep 2025 08:49:07 +0000 Subject: [PATCH 4/6] feat: add pre-commit --- .github/workflows/clang-tools-release.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/clang-tools-release.yml b/.github/workflows/clang-tools-release.yml index 1893b87..768b68a 100644 --- a/.github/workflows/clang-tools-release.yml +++ b/.github/workflows/clang-tools-release.yml @@ -262,7 +262,7 @@ jobs: run: | echo "${{ github.event.inputs.llvm_version }}.${{ github.event.inputs.wheel_version }}" > clang-format_version.txt cat clang-format_version.txt - + - name: Build SDist run: pipx run build --sdist @@ -416,7 +416,7 @@ jobs: create-draft-release: name: Create draft release on GitHub needs: [ - build-clang-format-wheels, + build-clang-format-wheels, build-clang-tidy-wheels, build-clang-format-sdist, build-clang-tidy-sdist, @@ -449,7 +449,7 @@ jobs: # Copy clang-tidy artifacts find clang-tidy-dist -name "*.whl" -exec cp {} release-assets/ \; find clang-tidy-dist -name "*.tar.gz" -exec cp {} release-assets/ \; - + echo "Release assets:" ls -la release-assets/ @@ -462,22 +462,22 @@ jobs: name: "v${{ github.event.inputs.llvm_version }}" body: | # Clang Tools Python wheels - + This release contains both `clang-format` and `clang-tidy` wheel packages. - + ## Included packages: - **clang-format**: Code formatting tool - **clang-tidy**: Static analysis and linting tool - + ## Installation: ```bash # Install clang-format pip install clang-format-${{ github.event.inputs.llvm_version }}-.whl - - # Install clang-tidy + + # Install clang-tidy pip install clang-tidy-${{ github.event.inputs.llvm_version }}-.whl ``` - + ## Assets: - `.whl` files: Binary wheel packages for different platforms - `.tar.gz` files: Source distributions From 7068244e8a275fe97c42a062508fb9fead330980 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 26 Sep 2025 08:56:21 +0000 Subject: [PATCH 5/6] feat: add pre-commit --- .github/workflows/clang-tools-release.yml | 1 + .github/workflows/pre-commit.yml | 13 +++++++++++++ .pre-commit-config.yaml | 9 +++++++++ 3 files changed, 23 insertions(+) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/clang-tools-release.yml b/.github/workflows/clang-tools-release.yml index 768b68a..04b94b1 100644 --- a/.github/workflows/clang-tools-release.yml +++ b/.github/workflows/clang-tools-release.yml @@ -1,6 +1,7 @@ name: Build clang-tools wheels on: + workflow_dispatch: inputs: llvm_version: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..4b5f07e --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,13 @@ +name: Run pre-commit + +on: + push: + pull_request: + types: opened + +permissions: + contents: read + +jobs: + pre-commit: + uses: cpp-linter/.github/.github/workflows/pre-commit.yml@main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..8841fdc --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: check-yaml + - id: end-of-file-fixer + - id: check-added-large-files + - id: check-merge-conflict From 25293d9bd3abfafce0f06f90181f41534b5bb512 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Fri, 26 Sep 2025 11:59:28 +0300 Subject: [PATCH 6/6] chore: delete .github/workflows/pre-commit.yml --- .github/workflows/pre-commit.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 4b5f07e..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Run pre-commit - -on: - push: - pull_request: - types: opened - -permissions: - contents: read - -jobs: - pre-commit: - uses: cpp-linter/.github/.github/workflows/pre-commit.yml@main