From 644bcaee7bf248a16c62c5d8b685da3d38beb2ba Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Thu, 3 Jul 2025 20:55:56 +0800 Subject: [PATCH 1/4] add github action --- .github/ISSUE_TEMPLATE/bug-report.yml | 32 +++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.yml | 40 ++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 11 ++++++ .github/conventional-commit-lint.yaml | 2 ++ .github/workflows/build-and-test.yml | 22 ++++++++++++ pom.xml | 16 ++++----- 6 files changed, 115 insertions(+), 8 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/conventional-commit-lint.yaml create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..8861fa8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,32 @@ +name: 🐞 Bug Report +description: File a bug report +title: "[Bug]: " +type: "Bug" +body: + - type: markdown + attributes: + value: | + Thanks for stopping by to let us know something could be better! + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us what you expected to happen and how to reproduce the issue. + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/MetaGLM/zhipuai-sdk-java-v4/blob/main/CODE_OF_CONDUCT.md) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..cfe2df2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,40 @@ +name: 💡 Feature Request +description: Suggest an idea for this repository +title: "[Feat]: " +type: "Feature" +body: + - type: markdown + attributes: + value: | + Thanks for stopping by to let us know something could be better! + - type: textarea + id: problem + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. + placeholder: Ex. I'm always frustrated when [...] + - type: textarea + id: describe + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + - type: textarea + id: context + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/MetaGLM/zhipuai-sdk-java-v4/blob/main/CODE_OF_CONDUCT.md) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..bd530f8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +# Description + +Thank you for opening a Pull Request! +Before submitting your PR, there are a few things you can do to make sure it goes smoothly: + +- [ ] Follow the [`CONTRIBUTING` Guide](https://github.com/MetaGLM/zhipuai-sdk-java-v4/blob/main/CONTRIBUTING.md). +- [ ] Make your Pull Request title in the specification. +- [ ] Ensure the tests pass (Run `mvn clean test` from the repository root) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # diff --git a/.github/conventional-commit-lint.yaml b/.github/conventional-commit-lint.yaml new file mode 100644 index 0000000..42be653 --- /dev/null +++ b/.github/conventional-commit-lint.yaml @@ -0,0 +1,2 @@ +enabled: true +always_check_pr_title: true \ No newline at end of file diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..4e64729 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,22 @@ +name: Build and Test +on: + pull_request: + branches: + - main + push: + branches: + - 'action*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + java-version: '8' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package diff --git a/pom.xml b/pom.xml index 6fd509a..a8ece16 100644 --- a/pom.xml +++ b/pom.xml @@ -10,8 +10,8 @@ jar - ZhiPu sdk for GLM open api - Java SDK for zhipu Big Model API + Zhipu sdk for GLM open api + Java SDK for Zhipu Big Model API https://open.bigmodel.cn/ @@ -150,6 +150,12 @@ 2.9.0 + + org.apache.tika + tika-core + 2.9.0 + + org.junit.jupiter @@ -210,12 +216,6 @@ test - - org.apache.tika - tika-core - 2.9.0 - - From 8a2d4c95e987bbeee969a836fe833ef07cf3dd0b Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Fri, 4 Jul 2025 10:35:01 +0800 Subject: [PATCH 2/4] add github action --- .github/conventional-commit-lint.yaml | 2 -- .github/workflows/lint-pr.yaml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) delete mode 100644 .github/conventional-commit-lint.yaml create mode 100644 .github/workflows/lint-pr.yaml diff --git a/.github/conventional-commit-lint.yaml b/.github/conventional-commit-lint.yaml deleted file mode 100644 index 42be653..0000000 --- a/.github/conventional-commit-lint.yaml +++ /dev/null @@ -1,2 +0,0 @@ -enabled: true -always_check_pr_title: true \ No newline at end of file diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml new file mode 100644 index 0000000..d0aa26d --- /dev/null +++ b/.github/workflows/lint-pr.yaml @@ -0,0 +1,19 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - reopened + +jobs: + lint-pr: + name: Validate PR title + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 8d5a1ac5514e6ed7ceabdfe0d9b842c586d3a42d Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Fri, 4 Jul 2025 10:39:18 +0800 Subject: [PATCH 3/4] add github action --- .github/workflows/lint-pr.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml index d0aa26d..d00836d 100644 --- a/.github/workflows/lint-pr.yaml +++ b/.github/workflows/lint-pr.yaml @@ -6,6 +6,9 @@ on: - opened - edited - reopened + push: + branches: + - 'action*' jobs: lint-pr: From ac60da5973b27853d36dc6b5555f1f038a943ee2 Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Fri, 4 Jul 2025 10:41:39 +0800 Subject: [PATCH 4/4] add github action --- .github/workflows/lint-pr.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml index d00836d..d0aa26d 100644 --- a/.github/workflows/lint-pr.yaml +++ b/.github/workflows/lint-pr.yaml @@ -6,9 +6,6 @@ on: - opened - edited - reopened - push: - branches: - - 'action*' jobs: lint-pr: