diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..9f69cd8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,30 @@ +--- +name: Bug report +about: Create a bug report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +List the steps that can be used to demonstrate the bug. Include the name of the service and operation that you're trying to invoke, if applicable. Be sure to describe any relevant info regarding parameter values used with your API invocation. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Must gather (please complete the following information):** + - SDK Version [e.g. 1.2.1] + - Java Version [e.g. openjdk 8] + - Name of service that you're trying to use (if applicable) + - Name of operation that you're trying to invoke (if applicable) + +**Additional context** +Add any other context about the problem here. +Were you able to avoid the problem by changing your application code slightly? \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..24473de --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..16d37a0 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,21 @@ +## PR summary + + + +## PR Checklist +Please make sure that your PR fulfills the following requirements: +- [ ] The commit message follows the [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines). +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) + +## Current vs new behavior + + +## Does this PR introduce a breaking change? +- [ ] Yes +- [ ] No + + + +## Other information + \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..2d7c631 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,106 @@ +# This workflow will build and unit test the project. +# If the workflow is running on the "main" branch, then +# semantic-release is also run to create a new release (if +# warranted by the new commits being built). + +name: build + +on: + push: + branches: [ '**' ] + pull_request: + branches: [ '**' ] + workflow_dispatch: + # Allow workflow to be triggered manually. + +jobs: + detect-secrets: + if: "!contains(github.event.head_commit.message, '[skip ci]')" + name: detect-secrets + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - name: Install detect-secrets + run: | + pip install --upgrade "git+https://github.com/ibm/detect-secrets.git@master#egg=detect-secrets" + + - name: Run detect-secrets + run: | + detect-secrets scan --update .secrets.baseline + detect-secrets -v audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline + + build: + name: build-test (java ${{matrix.java-version}}) + needs: detect-secrets + runs-on: ubuntu-latest + strategy: + matrix: + java-version: ['11', '25'] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Java ${{matrix.java-version}} + uses: actions/setup-java@v4 + with: + java-version: ${{matrix.java-version}} + distribution: 'adopt' + cache: 'maven' + + - name: Build & Test + run: mvn -B clean verify -fae -DskipITs + + results: + if: ${{ always() }} + runs-on: ubuntu-latest + name: Final Test Results + needs: [build] + steps: + - run: | + result="${{ needs.build.result }}" + if [[ $result == "success" || $result == "skipped" ]]; then + exit 0 + else + exit 1 + fi + + create-release: + needs: build + name: semantic-release + if: "github.ref_name == 'master' && github.event_name != 'pull_request'" + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - name: Install Publishing Tools + run: | + pip install bump-my-version + npm install + + - name: Run semantic-release + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + run: npm run semantic-release \ No newline at end of file diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..5331699 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,58 @@ +# This workflow is responsible for: +# - publishing artifacts to Maven Central +# - building and publishing javadocs to the git repository. +# It is triggered when a new release is created. + +name: publish + +on: + release: + types: [created] + workflow_dispatch: + # Allow this workflow to be triggered manually + +jobs: + publish-release: + name: publish-release + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: 'adopt' + cache: 'maven' + # Configure ~/.m2/settings.xml + server-id: central + server-username: CP_USERNAME + server-password: CP_PASSWORD + # Import GPG key into build agent's local keystore + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + + - name: Set artifact version to ${{ github.ref_name }} + run: mvn -B versions:set -DnewVersion=${{ github.ref_name}} -DgenerateBackupPoms=false + + - name: Publish Javadocs + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_REPO_SLUG: ${{ github.repository }} + GH_TAG: ${{ github.ref_name}} + run: | + mvn -B clean javadoc:aggregate + build/publishJavadoc-gha.sh + + - name: Publish to Maven Central + env: + CP_USERNAME: ${{ secrets.CP_USERNAME }} + CP_PASSWORD: ${{ secrets.CP_PASSWORD }} + GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: | + mvn -B deploy -DskipTests -P central \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e9d71c7 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: + - repo: https://github.com/ibm/detect-secrets + # If you desire to use a specific version of detect-secrets, you can replace `master` with other git revisions such as branch, tag or commit sha. + # You are encouraged to use static refs such as tags, instead of branch name + # + # Running "pre-commit autoupdate" automatically updates rev to latest tag + rev: 0.13.1+ibm.64.dss + hooks: + - id: detect-secrets # pragma: whitelist secret + # Add options for detect-secrets-hook binary. You can run `detect-secrets-hook --help` to list out all possible options. + # You may also run `pre-commit run detect-secrets` to preview the scan result. + # when "--baseline" without "--use-all-plugins", pre-commit scan with just plugins in baseline file + # when "--baseline" with "--use-all-plugins", pre-commit scan with all available plugins + # add "--fail-on-unaudited" to fail pre-commit for unaudited potential secrets + args: [--baseline, .secrets.baseline, --use-all-plugins] \ No newline at end of file diff --git a/.secrets.baseline b/.secrets.baseline index 73f560b..ccccff7 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "^.secrets.baseline$", "lines": null }, - "generated_at": "2022-08-12T06:37:50Z", + "generated_at": "2026-05-11T21:21:02Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -76,8 +76,19 @@ "name": "TwilioKeyDetector" } ], - "results": {}, - "version": "0.13.1+ibm.50.dss", + "results": { + ".github/workflows/publish.yaml": [ + { + "hashed_secret": "b8fb27ac44ff8a4d5237588af39c5fb65bbedc3f", + "is_secret": false, + "is_verified": false, + "line_number": 34, + "type": "Secret Keyword", + "verified_result": null + } + ] + }, + "version": "0.13.1+ibm.64.dss", "word_list": { "file": null, "hash": null diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bdfd2c3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -language: java -dist: jammy - -jdk: -- openjdk11 - -notifications: - email: true - -branches: - except: - - gh-pages - -cache: - directories: - - "$HOME/.m2" - -env: - global: - - MVN_ARGS="--settings build/.travis.settings.xml" - -stages: - - name: Build-Test - - name: Semantic-Release - if: branch = master AND type = push AND fork = false - - name: Publish-Release - if: tag IS present - -jobs: - include: - - stage: Build-Test - jdk: openjdk11 - install: true - script: - - build/setMavenVersion.sh - - mvn verify -fae -DskipITs $MVN_ARGS - - - jdk: openjdk17 - install: true - script: - - mvn verify -fae -DskipITs $MVN_ARGS - - - name: Detect-Secrets - language: python - python: 3.12 - install: - - pip install --upgrade "git+https://github.com/ibm/detect-secrets.git@master#egg=detect-secrets" - script: - - detect-secrets scan --update .secrets.baseline - - detect-secrets -v audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline - - - stage: Semantic-Release - language: node_js - node_js: 22 - install: - - pip install --user bump-my-version - - npm install - script: - - npm run semantic-release - - - stage: Publish-Release - jdk: openjdk11 - name: Publish-Javadoc - install: true - script: - - build/setMavenVersion.sh - - mvn clean javadoc:aggregate $MVN_ARGS - - build/publishJavadoc.sh - after_success: - - echo "Javadocs successfully published to gh-pages!" - - - jdk: openjdk11 - name: Publish-To-Maven-Central - install: true - script: - - build/setupSigning.sh - - build/setMavenVersion.sh - - mvn deploy $MVN_ARGS -DskipTests -P central - after_success: - - echo "Maven artifacts successfully published to Maven Central!" \ No newline at end of file