diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4ef7ed5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,28 @@ +name: Lint + +on: + pull_request: + paths: ["**.rs", "**.toml", "**.lock"] + push: + branches: [main] + paths: ["**.rs", "**.toml", "**.lock"] + +jobs: + rust: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.lock') }}-test + + - name: clippy + run: cargo clippy + + - name: rustfmt check + run: cargo fmt --all --check \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c816275..6e39c4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,271 +1,271 @@ -# Copyright 2022-2024, axodotdev -# SPDX-License-Identifier: MIT or Apache-2.0 -# -# CI that: -# -# * checks for a Git Tag that looks like a release -# * builds artifacts with cargo-dist (archives, installers, hashes) -# * uploads those artifacts to temporary workflow zip -# * on success, uploads the artifacts to a GitHub Release -# -# Note that the GitHub Release will be created with a generated -# title/body based on your changelogs. - -name: Release - -permissions: - contents: write - -# This task will run whenever you push a git tag that looks like a version -# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc. -# Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where -# PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION -# must be a Cargo-style SemVer Version (must have at least major.minor.patch). -# -# If PACKAGE_NAME is specified, then the announcement will be for that -# package (erroring out if it doesn't have the given version or isn't cargo-dist-able). -# -# If PACKAGE_NAME isn't specified, then the announcement will be for all -# (cargo-dist-able) packages in the workspace with that version (this mode is -# intended for workspaces with only one dist-able package, or with all dist-able -# packages versioned/released in lockstep). -# -# If you push multiple tags at once, separate instances of this workflow will -# spin up, creating an independent announcement for each one. However, GitHub -# will hard limit this to 3 tags per commit, as it will assume more tags is a -# mistake. -# -# If there's a prerelease-style suffix to the version, then the release(s) -# will be marked as a prerelease. -on: - pull_request: - push: - tags: - - '**[0-9]+.[0-9]+.[0-9]+*' - -jobs: - # Run 'cargo dist plan' (or host) to determine what tasks we need to do - plan: - runs-on: "ubuntu-20.04" - outputs: - val: ${{ steps.plan.outputs.manifest }} - tag: ${{ !github.event.pull_request && github.ref_name || '' }} - tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }} - publishing: ${{ !github.event.pull_request }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Install cargo-dist - # we specify bash to get pipefail; it guards against the `curl` command - # failing. otherwise `sh` won't catch that `curl` returned non-0 - shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.1/cargo-dist-installer.sh | sh" - # sure would be cool if github gave us proper conditionals... - # so here's a doubly-nested ternary-via-truthiness to try to provide the best possible - # functionality based on whether this is a pull_request, and whether it's from a fork. - # (PRs run on the *source* but secrets are usually on the *target* -- that's *good* - # but also really annoying to build CI around when it needs secrets to work right.) - - id: plan - run: | - cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json - echo "cargo dist ran successfully" - cat plan-dist-manifest.json - echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" - - name: "Upload dist-manifest.json" - uses: actions/upload-artifact@v4 - with: - name: artifacts-plan-dist-manifest - path: plan-dist-manifest.json - - # Build and packages all the platform-specific things - build-local-artifacts: - name: build-local-artifacts (${{ join(matrix.targets, ', ') }}) - # Let the initial task tell us to not run (currently very blunt) - needs: - - plan - if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }} - strategy: - fail-fast: false - # Target platforms/runners are computed by cargo-dist in create-release. - # Each member of the matrix has the following arguments: - # - # - runner: the github runner - # - dist-args: cli flags to pass to cargo dist - # - install-dist: expression to run to install cargo-dist on the runner - # - # Typically there will be: - # - 1 "global" task that builds universal installers - # - N "local" tasks that build each platform's binaries and platform-specific installers - matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }} - runs-on: ${{ matrix.runner }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json - steps: - - name: enable windows longpaths - run: | - git config --global core.longpaths true - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: swatinem/rust-cache@v2 - with: - key: ${{ join(matrix.targets, '-') }} - - name: Install cargo-dist - run: ${{ matrix.install_dist }} - # Get the dist-manifest - - name: Fetch local artifacts - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: target/distrib/ - merge-multiple: true - - name: Install dependencies - run: | - ${{ matrix.packages_install }} - - name: Build artifacts - run: | - # Actually do builds and make zips and whatnot - cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json - echo "cargo dist ran successfully" - - id: cargo-dist - name: Post-build - # We force bash here just because github makes it really hard to get values up - # to "real" actions without writing to env-vars, and writing to env-vars has - # inconsistent syntax between shell and powershell. - shell: bash - run: | - # Parse out what we just built and upload it to scratch storage - echo "paths<> "$GITHUB_OUTPUT" - jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT" - echo "EOF" >> "$GITHUB_OUTPUT" - - cp dist-manifest.json "$BUILD_MANIFEST_NAME" - - name: "Upload artifacts" - uses: actions/upload-artifact@v4 - with: - name: artifacts-build-local-${{ join(matrix.targets, '_') }} - path: | - ${{ steps.cargo-dist.outputs.paths }} - ${{ env.BUILD_MANIFEST_NAME }} - - # Build and package all the platform-agnostic(ish) things - build-global-artifacts: - needs: - - plan - - build-local-artifacts - runs-on: "ubuntu-20.04" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Install cargo-dist - shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.1/cargo-dist-installer.sh | sh" - # Get all the local artifacts for the global tasks to use (for e.g. checksums) - - name: Fetch local artifacts - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: target/distrib/ - merge-multiple: true - - id: cargo-dist - shell: bash - run: | - cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json - echo "cargo dist ran successfully" - - # Parse out what we just built and upload it to scratch storage - echo "paths<> "$GITHUB_OUTPUT" - jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT" - echo "EOF" >> "$GITHUB_OUTPUT" - - cp dist-manifest.json "$BUILD_MANIFEST_NAME" - - name: "Upload artifacts" - uses: actions/upload-artifact@v4 - with: - name: artifacts-build-global - path: | - ${{ steps.cargo-dist.outputs.paths }} - ${{ env.BUILD_MANIFEST_NAME }} - # Determines if we should publish/announce - host: - needs: - - plan - - build-local-artifacts - - build-global-artifacts - # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine) - if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - runs-on: "ubuntu-20.04" - outputs: - val: ${{ steps.host.outputs.manifest }} - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Install cargo-dist - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.1/cargo-dist-installer.sh | sh" - # Fetch artifacts from scratch-storage - - name: Fetch artifacts - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: target/distrib/ - merge-multiple: true - # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce" - - id: host - shell: bash - run: | - cargo dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json - echo "artifacts uploaded and released successfully" - cat dist-manifest.json - echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" - - name: "Upload dist-manifest.json" - uses: actions/upload-artifact@v4 - with: - # Overwrite the previous copy - name: artifacts-dist-manifest - path: dist-manifest.json - - # Create a GitHub Release while uploading all files to it - announce: - needs: - - plan - - host - # use "always() && ..." to allow us to wait for all publish jobs while - # still allowing individual publish jobs to skip themselves (for prereleases). - # "host" however must run to completion, no skipping allowed! - if: ${{ always() && needs.host.result == 'success' }} - runs-on: "ubuntu-20.04" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: "Download GitHub Artifacts" - uses: actions/download-artifact@v4 - with: - pattern: artifacts-* - path: artifacts - merge-multiple: true - - name: Cleanup - run: | - # Remove the granular manifests - rm -f artifacts/*-dist-manifest.json - - name: Create GitHub Release - uses: ncipollo/release-action@v1 - with: - tag: ${{ needs.plan.outputs.tag }} - name: ${{ fromJson(needs.host.outputs.val).announcement_title }} - body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }} - prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }} - artifacts: "artifacts/*" +# Copyright 2022-2024, axodotdev +# SPDX-License-Identifier: MIT or Apache-2.0 +# +# CI that: +# +# * checks for a Git Tag that looks like a release +# * builds artifacts with cargo-dist (archives, installers, hashes) +# * uploads those artifacts to temporary workflow zip +# * on success, uploads the artifacts to a GitHub Release +# +# Note that the GitHub Release will be created with a generated +# title/body based on your changelogs. + +name: Release + +permissions: + contents: write + +# This task will run whenever you push a git tag that looks like a version +# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc. +# Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where +# PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION +# must be a Cargo-style SemVer Version (must have at least major.minor.patch). +# +# If PACKAGE_NAME is specified, then the announcement will be for that +# package (erroring out if it doesn't have the given version or isn't cargo-dist-able). +# +# If PACKAGE_NAME isn't specified, then the announcement will be for all +# (cargo-dist-able) packages in the workspace with that version (this mode is +# intended for workspaces with only one dist-able package, or with all dist-able +# packages versioned/released in lockstep). +# +# If you push multiple tags at once, separate instances of this workflow will +# spin up, creating an independent announcement for each one. However, GitHub +# will hard limit this to 3 tags per commit, as it will assume more tags is a +# mistake. +# +# If there's a prerelease-style suffix to the version, then the release(s) +# will be marked as a prerelease. +on: + pull_request: + push: + tags: + - '**[0-9]+.[0-9]+.[0-9]+*' + +jobs: + # Run 'cargo dist plan' (or host) to determine what tasks we need to do + plan: + runs-on: "ubuntu-20.04" + outputs: + val: ${{ steps.plan.outputs.manifest }} + tag: ${{ !github.event.pull_request && github.ref_name || '' }} + tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }} + publishing: ${{ !github.event.pull_request }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install cargo-dist + # we specify bash to get pipefail; it guards against the `curl` command + # failing. otherwise `sh` won't catch that `curl` returned non-0 + shell: bash + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.1/cargo-dist-installer.sh | sh" + # sure would be cool if github gave us proper conditionals... + # so here's a doubly-nested ternary-via-truthiness to try to provide the best possible + # functionality based on whether this is a pull_request, and whether it's from a fork. + # (PRs run on the *source* but secrets are usually on the *target* -- that's *good* + # but also really annoying to build CI around when it needs secrets to work right.) + - id: plan + run: | + cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json + echo "cargo dist ran successfully" + cat plan-dist-manifest.json + echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" + - name: "Upload dist-manifest.json" + uses: actions/upload-artifact@v4 + with: + name: artifacts-plan-dist-manifest + path: plan-dist-manifest.json + + # Build and packages all the platform-specific things + build-local-artifacts: + name: build-local-artifacts (${{ join(matrix.targets, ', ') }}) + # Let the initial task tell us to not run (currently very blunt) + needs: + - plan + if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }} + strategy: + fail-fast: false + # Target platforms/runners are computed by cargo-dist in create-release. + # Each member of the matrix has the following arguments: + # + # - runner: the github runner + # - dist-args: cli flags to pass to cargo dist + # - install-dist: expression to run to install cargo-dist on the runner + # + # Typically there will be: + # - 1 "global" task that builds universal installers + # - N "local" tasks that build each platform's binaries and platform-specific installers + matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }} + runs-on: ${{ matrix.runner }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json + steps: + - name: enable windows longpaths + run: | + git config --global core.longpaths true + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: swatinem/rust-cache@v2 + with: + key: ${{ join(matrix.targets, '-') }} + - name: Install cargo-dist + run: ${{ matrix.install_dist }} + # Get the dist-manifest + - name: Fetch local artifacts + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: target/distrib/ + merge-multiple: true + - name: Install dependencies + run: | + ${{ matrix.packages_install }} + - name: Build artifacts + run: | + # Actually do builds and make zips and whatnot + cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + echo "cargo dist ran successfully" + - id: cargo-dist + name: Post-build + # We force bash here just because github makes it really hard to get values up + # to "real" actions without writing to env-vars, and writing to env-vars has + # inconsistent syntax between shell and powershell. + shell: bash + run: | + # Parse out what we just built and upload it to scratch storage + echo "paths<> "$GITHUB_OUTPUT" + jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" + + cp dist-manifest.json "$BUILD_MANIFEST_NAME" + - name: "Upload artifacts" + uses: actions/upload-artifact@v4 + with: + name: artifacts-build-local-${{ join(matrix.targets, '_') }} + path: | + ${{ steps.cargo-dist.outputs.paths }} + ${{ env.BUILD_MANIFEST_NAME }} + + # Build and package all the platform-agnostic(ish) things + build-global-artifacts: + needs: + - plan + - build-local-artifacts + runs-on: "ubuntu-20.04" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install cargo-dist + shell: bash + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.1/cargo-dist-installer.sh | sh" + # Get all the local artifacts for the global tasks to use (for e.g. checksums) + - name: Fetch local artifacts + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: target/distrib/ + merge-multiple: true + - id: cargo-dist + shell: bash + run: | + cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json + echo "cargo dist ran successfully" + + # Parse out what we just built and upload it to scratch storage + echo "paths<> "$GITHUB_OUTPUT" + jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" + + cp dist-manifest.json "$BUILD_MANIFEST_NAME" + - name: "Upload artifacts" + uses: actions/upload-artifact@v4 + with: + name: artifacts-build-global + path: | + ${{ steps.cargo-dist.outputs.paths }} + ${{ env.BUILD_MANIFEST_NAME }} + # Determines if we should publish/announce + host: + needs: + - plan + - build-local-artifacts + - build-global-artifacts + # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine) + if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + runs-on: "ubuntu-20.04" + outputs: + val: ${{ steps.host.outputs.manifest }} + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install cargo-dist + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.15.1/cargo-dist-installer.sh | sh" + # Fetch artifacts from scratch-storage + - name: Fetch artifacts + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: target/distrib/ + merge-multiple: true + # This is a harmless no-op for GitHub Releases, hosting for that happens in "announce" + - id: host + shell: bash + run: | + cargo dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json + echo "artifacts uploaded and released successfully" + cat dist-manifest.json + echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" + - name: "Upload dist-manifest.json" + uses: actions/upload-artifact@v4 + with: + # Overwrite the previous copy + name: artifacts-dist-manifest + path: dist-manifest.json + + # Create a GitHub Release while uploading all files to it + announce: + needs: + - plan + - host + # use "always() && ..." to allow us to wait for all publish jobs while + # still allowing individual publish jobs to skip themselves (for prereleases). + # "host" however must run to completion, no skipping allowed! + if: ${{ always() && needs.host.result == 'success' }} + runs-on: "ubuntu-20.04" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: "Download GitHub Artifacts" + uses: actions/download-artifact@v4 + with: + pattern: artifacts-* + path: artifacts + merge-multiple: true + - name: Cleanup + run: | + # Remove the granular manifests + rm -f artifacts/*-dist-manifest.json + - name: Create GitHub Release + uses: ncipollo/release-action@v1 + with: + tag: ${{ needs.plan.outputs.tag }} + name: ${{ fromJson(needs.host.outputs.val).announcement_title }} + body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }} + prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }} + artifacts: "artifacts/*" diff --git a/.gitignore b/.gitignore index ea8c4bf..0b42d2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/target +/target diff --git a/Cargo.lock b/Cargo.lock index c8a7252..9a54f56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,30 +4,30 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", @@ -118,17 +118,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -139,15 +139,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bumpalo" @@ -157,9 +151,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "catppuccin-rockdove" @@ -180,9 +174,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.99" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -202,20 +199,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "displaydoc" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "encoding_rs" @@ -253,9 +239,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fnv" @@ -326,17 +312,28 @@ dependencies = [ "pin-utils", ] +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -388,9 +385,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -411,9 +408,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.2" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3935c160d00ac752e09787e6e6bfc26494c2183cc922f1bc678a60d4733bc2" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -423,9 +420,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -442,6 +439,23 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-tls" version = "0.6.0" @@ -460,9 +474,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" dependencies = [ "bytes", "futures-channel", @@ -478,141 +492,21 @@ dependencies = [ "tracing", ] -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "idna" -version = "1.0.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "icu_normalizer", - "icu_properties", - "smallvec", - "utf8_iter", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -620,9 +514,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "itoa" @@ -632,24 +526,24 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "linux-raw-sys" @@ -657,12 +551,6 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -[[package]] -name = "litemap" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" - [[package]] name = "lock_api" version = "0.4.12" @@ -675,9 +563,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchit" @@ -687,9 +575,9 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -699,22 +587,23 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -744,38 +633,28 @@ dependencies = [ "winapi", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.35.0" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.5.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -803,9 +682,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -839,7 +718,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets", ] [[package]] @@ -888,36 +767,36 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ - "bitflags 2.5.0", + "bitflags", ] [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64", "bytes", @@ -929,6 +808,7 @@ dependencies = [ "http-body", "http-body-util", "hyper", + "hyper-rustls", "hyper-tls", "hyper-util", "ipnet", @@ -943,7 +823,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "system-configuration", "tokio", "tokio-native-tls", @@ -952,7 +832,22 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "windows-registry", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", ] [[package]] @@ -963,22 +858,35 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.23.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64", "rustls-pki-types", @@ -986,9 +894,20 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] [[package]] name = "rustversion" @@ -1004,11 +923,11 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1019,11 +938,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.5.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -1032,9 +951,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -1042,18 +961,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -1062,11 +981,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1102,6 +1022,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -1137,22 +1063,22 @@ dependencies = [ ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "spin" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.66" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -1170,34 +1096,26 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" - -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "proc-macro2", - "quote", - "syn", + "futures-core", ] [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -1205,14 +1123,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1226,39 +1145,43 @@ dependencies = [ ] [[package]] -name = "tinystr" -version = "0.7.6" +name = "tinyvec" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ - "displaydoc", - "zerovec", + "tinyvec_macros", ] +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" -version = "1.38.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", @@ -1275,11 +1198,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -1310,7 +1244,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.5.0", + "bitflags", "bytes", "http", "http-body", @@ -1323,15 +1257,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -1397,34 +1331,43 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] -name = "url" -version = "2.5.1" +name = "unicode-normalization" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", + "tinyvec", ] [[package]] -name = "utf16_iter" -version = "1.0.5" +name = "untrusted" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] -name = "utf8_iter" -version = "1.0.4" +name = "url" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] [[package]] name = "valuable" @@ -1455,19 +1398,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -1480,9 +1424,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -1492,9 +1436,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1502,9 +1446,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -1515,15 +1459,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -1552,229 +1496,119 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-strings", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-result", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.52.5" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows-targets", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" +name = "windows-targets" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +name = "windows_aarch64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - -[[package]] -name = "yoke" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerofrom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerovec" -version = "0.10.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "zerovec-derive" -version = "0.10.2" +name = "zeroize" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml index c05d4fc..fdff562 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,45 +1,45 @@ -[package] -name = "catppuccin-rockdove" -version = "0.6.0" -edition = "2021" -repository = "https://github.com/catppuccin/rockdove" - -[[bin]] -name = "rockdove" -path = "src/main.rs" - -[lints.clippy] -all = "warn" -pedantic = "warn" -nursery = "warn" - -[dependencies] -anyhow = "1.0.86" -axum = "0.7.5" -axum-github-webhook-extract = "0.2.0" -envy = "0.4.2" -reqwest = { version = "0.12.4", features = ["json"] } -serde = "1.0.203" -serde_json = "1.0.117" -tokio = { version = "1.38.0", features = ["full"] } -tower-http = { version = "0.5.2", features = ["trace"] } -tracing = "0.1.40" -tracing-subscriber = "0.3.18" - -# The profile that 'cargo dist' will build with -[profile.dist] -inherits = "release" -lto = "thin" - -# Config for 'cargo dist' -[workspace.metadata.dist] -# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.15.1" -# CI backends to support -ci = "github" -# The installers to generate for each app -installers = [] -# Target platforms to build apps for (Rust target-triple syntax) -targets = ["x86_64-unknown-linux-gnu"] -# Publish jobs to run in CI -pr-run-mode = "plan" +[package] +name = "catppuccin-rockdove" +version = "0.6.0" +edition = "2021" +repository = "https://github.com/catppuccin/rockdove" + +[[bin]] +name = "rockdove" +path = "src/main.rs" + +[lints.clippy] +all = "warn" +pedantic = "warn" +nursery = "warn" + +[dependencies] +anyhow = "1.0.86" +axum = "0.7.5" +axum-github-webhook-extract = "0.2.0" +envy = "0.4.2" +reqwest = { version = "0.12.4", features = ["json"] } +serde = "1.0.203" +serde_json = "1.0.117" +tokio = { version = "1.38.0", features = ["full"] } +tower-http = { version = "0.5.2", features = ["trace"] } +tracing = "0.1.40" +tracing-subscriber = "0.3.18" + +# The profile that 'cargo dist' will build with +[profile.dist] +inherits = "release" +lto = "thin" + +# Config for 'cargo dist' +[workspace.metadata.dist] +# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) +cargo-dist-version = "0.15.1" +# CI backends to support +ci = "github" +# The installers to generate for each app +installers = [] +# Target platforms to build apps for (Rust target-triple syntax) +targets = ["x86_64-unknown-linux-gnu"] +# Publish jobs to run in CI +pr-run-mode = "plan" diff --git a/LICENSE b/LICENSE index 306622e..a20f547 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2024 Catppuccin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2024 Catppuccin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 5b95661..cbddaaf 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# rockdove - -filter & redirect github webhooks - -## configuration - -the following environment variables are required: - -- `GITHUB_WEBHOOK_SECRET`: the secret you chose when you created the json webhook -- `DISCORD_WEBHOOK`: the regular discord webhook url -- `DISCORD_BOT_WEBHOOK`: the discord webhook url for bot-authored events - -the following environment variables are optional: - -- `PORT`: the port to listen on (default: 3000) +# rockdove + +filter & redirect github webhooks + +## configuration + +the following environment variables are required: + +- `GITHUB_WEBHOOK_SECRET`: the secret you chose when you created the json webhook +- `DISCORD_WEBHOOK`: the regular discord webhook url +- `DISCORD_BOT_WEBHOOK`: the discord webhook url for bot-authored events + +the following environment variables are optional: + +- `PORT`: the port to listen on (default: 3000) diff --git a/fixtures/bot_pull_request_opened.json b/fixtures/bot_pull_request_opened.json new file mode 100644 index 0000000..5a070bb --- /dev/null +++ b/fixtures/bot_pull_request_opened.json @@ -0,0 +1,521 @@ +{ + "action": "opened", + "number": 1, + "pull_request": { + "url": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/1", + "id": 2072493019, + "node_id": "PR_kwDOMDsg9M57h7vb", + "html_url": "https://github.com/catppuccin-rfc/cli-old/pull/1", + "diff_url": "https://github.com/catppuccin-rfc/cli-old/pull/1.diff", + "patch_url": "https://github.com/catppuccin-rfc/cli-old/pull/1.patch", + "issue_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/1", + "number": 1, + "state": "open", + "locked": false, + "title": "chore: Configure Renovate", + "user": { + "login": "renovate[bot]", + "id": 29139614, + "node_id": "MDM6Qm90MjkxMzk2MTQ=", + "avatar_url": "https://avatars.githubusercontent.com/in/2740?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/renovate%5Bbot%5D", + "html_url": "https://github.com/apps/renovate", + "followers_url": "https://api.github.com/users/renovate%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/renovate%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/renovate%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/renovate%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/renovate%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/renovate%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/renovate%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/renovate%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/renovate%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "body": "Welcome to [Renovate](https://redirect.github.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.\n\n🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.\n\n\n\n---\n### Detected Package Files\n\n * `Dockerfile` (dockerfile)\n * `.github/workflows/dockerfile.yml` (github-actions)\n * `.github/workflows/release.yaml` (github-actions)\n * `go.mod` (gomod)\n\n### Configuration Summary\n\nBased on the default config's presets, Renovate will:\n\n - Start dependency updates only once this onboarding PR is merged\n - Show all Merge Confidence badges for pull requests.\n - Enable Renovate Dependency Dashboard creation.\n - Use semantic commit type `fix` for dependencies and `chore` for all others if semantic commits are in use.\n - Ignore `node_modules`, `bower_components`, `vendor` and various test/tests directories.\n - Group known monorepo packages together.\n - Use curated list of recommended non-monorepo package groupings.\n - Apply crowd-sourced package replacement rules.\n - Apply crowd-sourced workarounds for known problems with packages.\n\n🔡 Do you want to change how Renovate upgrades your dependencies? Add your custom config to `renovate.json` in this branch. Renovate will update the Pull Request description the next time it runs.\n\n---\n\n### What to Expect\n\nWith your current configuration, Renovate will create 14 Pull Requests:\n\n
\nfix(deps): update github.com/pkg/browser digest to 5ac0b6a\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-pkg-browser-digest`\n - Merge into: `main`\n - Upgrade [github.com/pkg/browser](https://redirect.github.com/pkg/browser) to `5ac0b6a4141c`\n\n\n
\n\n
\nfix(deps): update module github.com/caarlos0/log to v0.4.6\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-caarlos0-log-0.x`\n - Merge into: `main`\n - Upgrade [github.com/caarlos0/log](https://redirect.github.com/caarlos0/log) to `v0.4.6`\n\n\n
\n\n
\nfix(deps): update module github.com/matryer/is to v1.4.1\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-matryer-is-1.x`\n - Merge into: `main`\n - Upgrade [github.com/matryer/is](https://redirect.github.com/matryer/is) to `v1.4.1`\n\n\n
\n\n
\nchore(deps): update vaultvulp/gp-docker-action action to v1.6.0\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/vaultvulp-gp-docker-action-1.x`\n - Merge into: `main`\n - Upgrade [VaultVulp/gp-docker-action](https://redirect.github.com/VaultVulp/gp-docker-action) to `1.6.0`\n\n\n
\n\n
\nfix(deps): update module github.com/charmbracelet/bubbles to v0.20.0\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-charmbracelet-bubbles-0.x`\n - Merge into: `main`\n - Upgrade [github.com/charmbracelet/bubbles](https://redirect.github.com/charmbracelet/bubbles) to `v0.20.0`\n\n\n
\n\n
\nfix(deps): update module github.com/charmbracelet/bubbletea to v0.27.1\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-charmbracelet-bubbletea-0.x`\n - Merge into: `main`\n - Upgrade [github.com/charmbracelet/bubbletea](https://redirect.github.com/charmbracelet/bubbletea) to `v0.27.1`\n\n\n
\n\n
\nfix(deps): update module github.com/charmbracelet/lipgloss to v0.13.0\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-charmbracelet-lipgloss-0.x`\n - Merge into: `main`\n - Upgrade [github.com/charmbracelet/lipgloss](https://redirect.github.com/charmbracelet/lipgloss) to `v0.13.0`\n\n\n
\n\n
\nfix(deps): update module github.com/go-git/go-git/v5 to v5.12.0\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-go-git-go-git-v5-5.x`\n - Merge into: `main`\n - Upgrade [github.com/go-git/go-git/v5](https://redirect.github.com/go-git/go-git) to `v5.12.0`\n\n\n
\n\n
\nfix(deps): update module github.com/spf13/cobra to v1.8.1\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-spf13-cobra-1.x`\n - Merge into: `main`\n - Upgrade [github.com/spf13/cobra](https://redirect.github.com/spf13/cobra) to `v1.8.1`\n\n\n
\n\n
\nchore(deps): update actions/checkout action to v4\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/actions-checkout-4.x`\n - Merge into: `main`\n - Upgrade [actions/checkout](https://redirect.github.com/actions/checkout) to `v4`\n\n\n
\n\n
\nchore(deps): update actions/setup-go action to v5\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/actions-setup-go-5.x`\n - Merge into: `main`\n - Upgrade [actions/setup-go](https://redirect.github.com/actions/setup-go) to `v5`\n\n\n
\n\n
\nchore(deps): update goreleaser/goreleaser-action action to v6\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/goreleaser-goreleaser-action-6.x`\n - Merge into: `main`\n - Upgrade [goreleaser/goreleaser-action](https://redirect.github.com/goreleaser/goreleaser-action) to `v6`\n\n\n
\n\n
\nfix(deps): update module github.com/charmbracelet/bubbletea to v1\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-charmbracelet-bubbletea-1.x`\n - Merge into: `main`\n - Upgrade [github.com/charmbracelet/bubbletea](https://redirect.github.com/charmbracelet/bubbletea) to `v1.1.1`\n\n\n
\n\n
\nfix(deps): update module github.com/google/go-github/v47 to v64\n\n - Schedule: [\"at any time\"]\n - Branch name: `renovate/github.com-google-go-github-v47-64.x`\n - Merge into: `main`\n - Upgrade [github.com/google/go-github/v47](https://redirect.github.com/google/go-github) to `v64.0.0`\n\n\n
\n\n\n\n🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or overwhelm the project. See docs for `prhourlylimit` for details.\n\n\n---\n\n❓ Got questions? Check out Renovate's [Docs](https://docs.renovatebot.com/), particularly the Getting Started section.\nIf you need any further assistance then you can also [request help here](https://redirect.github.com/renovatebot/renovate/discussions).\n\n\n---\n\nThis PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/catppuccin-rfc/cli-old).\n\n\n", + "created_at": "2024-09-14T22:55:00Z", + "updated_at": "2024-09-14T22:55:01Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [], + "requested_reviewers": [], + "requested_teams": [], + "labels": [], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/1/commits", + "review_comments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/1/comments", + "review_comment_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/1/comments", + "statuses_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/statuses/453371eb7038e640ca2c6324060bbe9548903d9e", + "head": { + "label": "catppuccin-rfc:renovate/configure", + "ref": "renovate/configure", + "sha": "453371eb7038e640ca2c6324060bbe9548903d9e", + "user": { + "login": "catppuccin-rfc", + "id": 111534585, + "node_id": "O_kgDOBqXh-Q", + "avatar_url": "https://avatars.githubusercontent.com/u/111534585?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/catppuccin-rfc", + "html_url": "https://github.com/catppuccin-rfc", + "followers_url": "https://api.github.com/users/catppuccin-rfc/followers", + "following_url": "https://api.github.com/users/catppuccin-rfc/following{/other_user}", + "gists_url": "https://api.github.com/users/catppuccin-rfc/gists{/gist_id}", + "starred_url": "https://api.github.com/users/catppuccin-rfc/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/catppuccin-rfc/subscriptions", + "organizations_url": "https://api.github.com/users/catppuccin-rfc/orgs", + "repos_url": "https://api.github.com/users/catppuccin-rfc/repos", + "events_url": "https://api.github.com/users/catppuccin-rfc/events{/privacy}", + "received_events_url": "https://api.github.com/users/catppuccin-rfc/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 809181428, + "node_id": "R_kgDOMDsg9A", + "name": "cli-old", + "full_name": "catppuccin-rfc/cli-old", + "private": true, + "owner": { + "login": "catppuccin-rfc", + "id": 111534585, + "node_id": "O_kgDOBqXh-Q", + "avatar_url": "https://avatars.githubusercontent.com/u/111534585?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/catppuccin-rfc", + "html_url": "https://github.com/catppuccin-rfc", + "followers_url": "https://api.github.com/users/catppuccin-rfc/followers", + "following_url": "https://api.github.com/users/catppuccin-rfc/following{/other_user}", + "gists_url": "https://api.github.com/users/catppuccin-rfc/gists{/gist_id}", + "starred_url": "https://api.github.com/users/catppuccin-rfc/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/catppuccin-rfc/subscriptions", + "organizations_url": "https://api.github.com/users/catppuccin-rfc/orgs", + "repos_url": "https://api.github.com/users/catppuccin-rfc/repos", + "events_url": "https://api.github.com/users/catppuccin-rfc/events{/privacy}", + "received_events_url": "https://api.github.com/users/catppuccin-rfc/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/catppuccin-rfc/cli-old", + "description": "A snapshot of catppuccin/cli before we NUKE it", + "fork": false, + "url": "https://api.github.com/repos/catppuccin-rfc/cli-old", + "forks_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/forks", + "keys_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/teams", + "hooks_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/hooks", + "issue_events_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/events{/number}", + "events_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/events", + "assignees_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/assignees{/user}", + "branches_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/branches{/branch}", + "tags_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/tags", + "blobs_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/statuses/{sha}", + "languages_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/languages", + "stargazers_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/stargazers", + "contributors_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/contributors", + "subscribers_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/subscribers", + "subscription_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/subscription", + "commits_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/contents/{+path}", + "compare_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/merges", + "archive_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/downloads", + "issues_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues{/number}", + "pulls_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls{/number}", + "milestones_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/milestones{/number}", + "notifications_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/labels{/name}", + "releases_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/releases{/id}", + "deployments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/deployments", + "created_at": "2024-06-01T23:55:50Z", + "updated_at": "2024-06-02T22:43:14Z", + "pushed_at": "2024-09-14T22:54:47Z", + "git_url": "git://github.com/catppuccin-rfc/cli-old.git", + "ssh_url": "git@github.com:catppuccin-rfc/cli-old.git", + "clone_url": "https://github.com/catppuccin-rfc/cli-old.git", + "svn_url": "https://github.com/catppuccin-rfc/cli-old", + "homepage": null, + "size": 31304, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE" + } + }, + "base": { + "label": "catppuccin-rfc:main", + "ref": "main", + "sha": "746277d3a488703e6ab0b8cebaa63a6a84d98363", + "user": { + "login": "catppuccin-rfc", + "id": 111534585, + "node_id": "O_kgDOBqXh-Q", + "avatar_url": "https://avatars.githubusercontent.com/u/111534585?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/catppuccin-rfc", + "html_url": "https://github.com/catppuccin-rfc", + "followers_url": "https://api.github.com/users/catppuccin-rfc/followers", + "following_url": "https://api.github.com/users/catppuccin-rfc/following{/other_user}", + "gists_url": "https://api.github.com/users/catppuccin-rfc/gists{/gist_id}", + "starred_url": "https://api.github.com/users/catppuccin-rfc/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/catppuccin-rfc/subscriptions", + "organizations_url": "https://api.github.com/users/catppuccin-rfc/orgs", + "repos_url": "https://api.github.com/users/catppuccin-rfc/repos", + "events_url": "https://api.github.com/users/catppuccin-rfc/events{/privacy}", + "received_events_url": "https://api.github.com/users/catppuccin-rfc/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 809181428, + "node_id": "R_kgDOMDsg9A", + "name": "cli-old", + "full_name": "catppuccin-rfc/cli-old", + "private": true, + "owner": { + "login": "catppuccin-rfc", + "id": 111534585, + "node_id": "O_kgDOBqXh-Q", + "avatar_url": "https://avatars.githubusercontent.com/u/111534585?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/catppuccin-rfc", + "html_url": "https://github.com/catppuccin-rfc", + "followers_url": "https://api.github.com/users/catppuccin-rfc/followers", + "following_url": "https://api.github.com/users/catppuccin-rfc/following{/other_user}", + "gists_url": "https://api.github.com/users/catppuccin-rfc/gists{/gist_id}", + "starred_url": "https://api.github.com/users/catppuccin-rfc/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/catppuccin-rfc/subscriptions", + "organizations_url": "https://api.github.com/users/catppuccin-rfc/orgs", + "repos_url": "https://api.github.com/users/catppuccin-rfc/repos", + "events_url": "https://api.github.com/users/catppuccin-rfc/events{/privacy}", + "received_events_url": "https://api.github.com/users/catppuccin-rfc/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/catppuccin-rfc/cli-old", + "description": "A snapshot of catppuccin/cli before we NUKE it", + "fork": false, + "url": "https://api.github.com/repos/catppuccin-rfc/cli-old", + "forks_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/forks", + "keys_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/teams", + "hooks_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/hooks", + "issue_events_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/events{/number}", + "events_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/events", + "assignees_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/assignees{/user}", + "branches_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/branches{/branch}", + "tags_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/tags", + "blobs_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/statuses/{sha}", + "languages_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/languages", + "stargazers_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/stargazers", + "contributors_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/contributors", + "subscribers_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/subscribers", + "subscription_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/subscription", + "commits_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/contents/{+path}", + "compare_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/merges", + "archive_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/downloads", + "issues_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues{/number}", + "pulls_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls{/number}", + "milestones_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/milestones{/number}", + "notifications_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/labels{/name}", + "releases_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/releases{/id}", + "deployments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/deployments", + "created_at": "2024-06-01T23:55:50Z", + "updated_at": "2024-06-02T22:43:14Z", + "pushed_at": "2024-09-14T22:54:47Z", + "git_url": "git://github.com/catppuccin-rfc/cli-old.git", + "ssh_url": "git@github.com:catppuccin-rfc/cli-old.git", + "clone_url": "https://github.com/catppuccin-rfc/cli-old.git", + "svn_url": "https://github.com/catppuccin-rfc/cli-old", + "homepage": null, + "size": 31304, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/1" + }, + "html": { + "href": "https://github.com/catppuccin-rfc/cli-old/pull/1" + }, + "issue": { + "href": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/1" + }, + "comments": { + "href": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/1/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/1/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls/1/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/catppuccin-rfc/cli-old/statuses/453371eb7038e640ca2c6324060bbe9548903d9e" + } + }, + "author_association": "NONE", + "auto_merge": null, + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 6, + "deletions": 0, + "changed_files": 1 + }, + "repository": { + "id": 809181428, + "node_id": "R_kgDOMDsg9A", + "name": "cli-old", + "full_name": "catppuccin-rfc/cli-old", + "private": true, + "owner": { + "login": "catppuccin-rfc", + "id": 111534585, + "node_id": "O_kgDOBqXh-Q", + "avatar_url": "https://avatars.githubusercontent.com/u/111534585?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/catppuccin-rfc", + "html_url": "https://github.com/catppuccin-rfc", + "followers_url": "https://api.github.com/users/catppuccin-rfc/followers", + "following_url": "https://api.github.com/users/catppuccin-rfc/following{/other_user}", + "gists_url": "https://api.github.com/users/catppuccin-rfc/gists{/gist_id}", + "starred_url": "https://api.github.com/users/catppuccin-rfc/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/catppuccin-rfc/subscriptions", + "organizations_url": "https://api.github.com/users/catppuccin-rfc/orgs", + "repos_url": "https://api.github.com/users/catppuccin-rfc/repos", + "events_url": "https://api.github.com/users/catppuccin-rfc/events{/privacy}", + "received_events_url": "https://api.github.com/users/catppuccin-rfc/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/catppuccin-rfc/cli-old", + "description": "A snapshot of catppuccin/cli before we NUKE it", + "fork": false, + "url": "https://api.github.com/repos/catppuccin-rfc/cli-old", + "forks_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/forks", + "keys_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/teams", + "hooks_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/hooks", + "issue_events_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/events{/number}", + "events_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/events", + "assignees_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/assignees{/user}", + "branches_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/branches{/branch}", + "tags_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/tags", + "blobs_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/statuses/{sha}", + "languages_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/languages", + "stargazers_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/stargazers", + "contributors_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/contributors", + "subscribers_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/subscribers", + "subscription_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/subscription", + "commits_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/contents/{+path}", + "compare_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/merges", + "archive_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/downloads", + "issues_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/issues{/number}", + "pulls_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/pulls{/number}", + "milestones_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/milestones{/number}", + "notifications_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/labels{/name}", + "releases_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/releases{/id}", + "deployments_url": "https://api.github.com/repos/catppuccin-rfc/cli-old/deployments", + "created_at": "2024-06-01T23:55:50Z", + "updated_at": "2024-06-02T22:43:14Z", + "pushed_at": "2024-09-14T22:54:47Z", + "git_url": "git://github.com/catppuccin-rfc/cli-old.git", + "ssh_url": "git@github.com:catppuccin-rfc/cli-old.git", + "clone_url": "https://github.com/catppuccin-rfc/cli-old.git", + "svn_url": "https://github.com/catppuccin-rfc/cli-old", + "homepage": null, + "size": 31304, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Go", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 1, + "watchers": 0, + "default_branch": "main", + "custom_properties": {} + }, + "organization": { + "login": "catppuccin-rfc", + "id": 111534585, + "node_id": "O_kgDOBqXh-Q", + "url": "https://api.github.com/orgs/catppuccin-rfc", + "repos_url": "https://api.github.com/orgs/catppuccin-rfc/repos", + "events_url": "https://api.github.com/orgs/catppuccin-rfc/events", + "hooks_url": "https://api.github.com/orgs/catppuccin-rfc/hooks", + "issues_url": "https://api.github.com/orgs/catppuccin-rfc/issues", + "members_url": "https://api.github.com/orgs/catppuccin-rfc/members{/member}", + "public_members_url": "https://api.github.com/orgs/catppuccin-rfc/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/111534585?v=4", + "description": "Soothing pastel experiments for the high-spirited!" + }, + "sender": { + "login": "renovate[bot]", + "id": 29139614, + "node_id": "MDM6Qm90MjkxMzk2MTQ=", + "avatar_url": "https://avatars.githubusercontent.com/in/2740?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/renovate%5Bbot%5D", + "html_url": "https://github.com/apps/renovate", + "followers_url": "https://api.github.com/users/renovate%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/renovate%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/renovate%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/renovate%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/renovate%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/renovate%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/renovate%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/renovate%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/renovate%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + } +} diff --git a/fixtures/comment_created.json b/fixtures/comment_created.json index 80007f4..72c47dd 100644 --- a/fixtures/comment_created.json +++ b/fixtures/comment_created.json @@ -1,256 +1,256 @@ -{ - "action": "created", - "issue": { - "url": "https://api.github.com/repos/catppuccin/java/issues/20", - "repository_url": "https://api.github.com/repos/catppuccin/java", - "labels_url": "https://api.github.com/repos/catppuccin/java/issues/20/labels{/name}", - "comments_url": "https://api.github.com/repos/catppuccin/java/issues/20/comments", - "events_url": "https://api.github.com/repos/catppuccin/java/issues/20/events", - "html_url": "https://github.com/catppuccin/java/issues/20", - "id": 2396591382, - "node_id": "I_kwDOIvYgYM6O2RUW", - "number": 20, - "title": "Reconsider OSSRH Authentication", - "user": { - "login": "sgoudham", - "id": 58985301, - "node_id": "MDQ6VXNlcjU4OTg1MzAx", - "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/sgoudham", - "html_url": "https://github.com/sgoudham", - "followers_url": "https://api.github.com/users/sgoudham/followers", - "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", - "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", - "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", - "organizations_url": "https://api.github.com/users/sgoudham/orgs", - "repos_url": "https://api.github.com/users/sgoudham/repos", - "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", - "received_events_url": "https://api.github.com/users/sgoudham/received_events", - "type": "User", - "site_admin": false - }, - "labels": [], - "state": "open", - "locked": false, - "assignee": null, - "assignees": [], - "milestone": null, - "comments": 1, - "created_at": "2024-07-08T21:18:02Z", - "updated_at": "2024-09-14T18:15:15Z", - "closed_at": null, - "author_association": "COLLABORATOR", - "active_lock_reason": null, - "body": "We've received the following email on releases@catppuccin.com\r\n\r\n> Dear Maven Central publisher,\r\n>\r\n> We are making changes to the OSSRH authentication backend. For most users this should be a transparent process, and you should be able to continue to use your existing username and password to connect the Nexus UI. In case you need to update your password, please [follow our documentation](https://central.sonatype.org/register/central-portal/#managing-your-credentials).\r\n>\r\n> To configure a publisher's plugin authentication you would need to update your plugin settings to use [a user token](https://central.sonatype.org/publish/generate-token/) instead of the Nexus UI username and password login.\r\n>\r\n> For more information about publishing to legacy OSSRH please consult our documentation at [https://central.sonatype.org/register/legacy/](https://central.sonatype.org/register/legacy/)\r\n>\r\n> Thank you,\r\n> The Central Team\r\n\r\nI'm a little unsure if we are regarded as a \"publisher\" but we should look to see if we need to switch to a token based authentication workflow.", - "reactions": { - "url": "https://api.github.com/repos/catppuccin/java/issues/20/reactions", - "total_count": 0, - "+1": 0, - "-1": 0, - "laugh": 0, - "hooray": 0, - "confused": 0, - "heart": 0, - "rocket": 0, - "eyes": 0 - }, - "timeline_url": "https://api.github.com/repos/catppuccin/java/issues/20/timeline", - "performed_via_github_app": null, - "state_reason": null - }, - "comment": { - "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061", - "html_url": "https://github.com/catppuccin/java/issues/20#issuecomment-2351090061", - "issue_url": "https://api.github.com/repos/catppuccin/java/issues/20", - "id": 2351090061, - "node_id": "IC_kwDOIvYgYM6MIsmN", - "user": { - "login": "sgoudham", - "id": 58985301, - "node_id": "MDQ6VXNlcjU4OTg1MzAx", - "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/sgoudham", - "html_url": "https://github.com/sgoudham", - "followers_url": "https://api.github.com/users/sgoudham/followers", - "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", - "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", - "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", - "organizations_url": "https://api.github.com/users/sgoudham/orgs", - "repos_url": "https://api.github.com/users/sgoudham/repos", - "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", - "received_events_url": "https://api.github.com/users/sgoudham/received_events", - "type": "User", - "site_admin": false - }, - "created_at": "2024-09-14T18:15:14Z", - "updated_at": "2024-09-14T18:15:14Z", - "author_association": "COLLABORATOR", - "body": "Testing", - "reactions": { - "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061/reactions", - "total_count": 0, - "+1": 0, - "-1": 0, - "laugh": 0, - "hooray": 0, - "confused": 0, - "heart": 0, - "rocket": 0, - "eyes": 0 - }, - "performed_via_github_app": null - }, - "repository": { - "id": 586555488, - "node_id": "R_kgDOIvYgYA", - "name": "java", - "full_name": "catppuccin/java", - "private": false, - "owner": { - "login": "catppuccin", - "id": 93489351, - "node_id": "O_kgDOBZKIxw", - "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/catppuccin", - "html_url": "https://github.com/catppuccin", - "followers_url": "https://api.github.com/users/catppuccin/followers", - "following_url": "https://api.github.com/users/catppuccin/following{/other_user}", - "gists_url": "https://api.github.com/users/catppuccin/gists{/gist_id}", - "starred_url": "https://api.github.com/users/catppuccin/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/catppuccin/subscriptions", - "organizations_url": "https://api.github.com/users/catppuccin/orgs", - "repos_url": "https://api.github.com/users/catppuccin/repos", - "events_url": "https://api.github.com/users/catppuccin/events{/privacy}", - "received_events_url": "https://api.github.com/users/catppuccin/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/catppuccin/java", - "description": "☕ Soothing pastel theme for Java", - "fork": false, - "url": "https://api.github.com/repos/catppuccin/java", - "forks_url": "https://api.github.com/repos/catppuccin/java/forks", - "keys_url": "https://api.github.com/repos/catppuccin/java/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/catppuccin/java/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/catppuccin/java/teams", - "hooks_url": "https://api.github.com/repos/catppuccin/java/hooks", - "issue_events_url": "https://api.github.com/repos/catppuccin/java/issues/events{/number}", - "events_url": "https://api.github.com/repos/catppuccin/java/events", - "assignees_url": "https://api.github.com/repos/catppuccin/java/assignees{/user}", - "branches_url": "https://api.github.com/repos/catppuccin/java/branches{/branch}", - "tags_url": "https://api.github.com/repos/catppuccin/java/tags", - "blobs_url": "https://api.github.com/repos/catppuccin/java/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/catppuccin/java/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/catppuccin/java/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/catppuccin/java/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/catppuccin/java/statuses/{sha}", - "languages_url": "https://api.github.com/repos/catppuccin/java/languages", - "stargazers_url": "https://api.github.com/repos/catppuccin/java/stargazers", - "contributors_url": "https://api.github.com/repos/catppuccin/java/contributors", - "subscribers_url": "https://api.github.com/repos/catppuccin/java/subscribers", - "subscription_url": "https://api.github.com/repos/catppuccin/java/subscription", - "commits_url": "https://api.github.com/repos/catppuccin/java/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/catppuccin/java/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/catppuccin/java/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/catppuccin/java/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/catppuccin/java/contents/{+path}", - "compare_url": "https://api.github.com/repos/catppuccin/java/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/catppuccin/java/merges", - "archive_url": "https://api.github.com/repos/catppuccin/java/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/catppuccin/java/downloads", - "issues_url": "https://api.github.com/repos/catppuccin/java/issues{/number}", - "pulls_url": "https://api.github.com/repos/catppuccin/java/pulls{/number}", - "milestones_url": "https://api.github.com/repos/catppuccin/java/milestones{/number}", - "notifications_url": "https://api.github.com/repos/catppuccin/java/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/catppuccin/java/labels{/name}", - "releases_url": "https://api.github.com/repos/catppuccin/java/releases{/id}", - "deployments_url": "https://api.github.com/repos/catppuccin/java/deployments", - "created_at": "2023-01-08T15:00:35Z", - "updated_at": "2024-09-14T18:10:43Z", - "pushed_at": "2024-09-14T18:10:41Z", - "git_url": "git://github.com/catppuccin/java.git", - "ssh_url": "git@github.com:catppuccin/java.git", - "clone_url": "https://github.com/catppuccin/java.git", - "svn_url": "https://github.com/catppuccin/java", - "homepage": "https://search.maven.org/artifact/com.catppuccin/catppuccin-palette", - "size": 109, - "stargazers_count": 15, - "watchers_count": 15, - "language": "Java", - "has_issues": true, - "has_projects": false, - "has_downloads": true, - "has_wiki": false, - "has_pages": false, - "has_discussions": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 4, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "allow_forking": true, - "is_template": false, - "web_commit_signoff_required": false, - "topics": [ - "catppuccin", - "hacktoberfest", - "java", - "java-library", - "library" - ], - "visibility": "public", - "forks": 0, - "open_issues": 4, - "watchers": 15, - "default_branch": "main", - "custom_properties": { - "whiskers": "not_applicable" - } - }, - "organization": { - "login": "catppuccin", - "id": 93489351, - "node_id": "O_kgDOBZKIxw", - "url": "https://api.github.com/orgs/catppuccin", - "repos_url": "https://api.github.com/orgs/catppuccin/repos", - "events_url": "https://api.github.com/orgs/catppuccin/events", - "hooks_url": "https://api.github.com/orgs/catppuccin/hooks", - "issues_url": "https://api.github.com/orgs/catppuccin/issues", - "members_url": "https://api.github.com/orgs/catppuccin/members{/member}", - "public_members_url": "https://api.github.com/orgs/catppuccin/public_members{/member}", - "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", - "description": "Soothing pastel theme for the high-spirited!" - }, - "sender": { - "login": "sgoudham", - "id": 58985301, - "node_id": "MDQ6VXNlcjU4OTg1MzAx", - "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/sgoudham", - "html_url": "https://github.com/sgoudham", - "followers_url": "https://api.github.com/users/sgoudham/followers", - "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", - "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", - "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", - "organizations_url": "https://api.github.com/users/sgoudham/orgs", - "repos_url": "https://api.github.com/users/sgoudham/repos", - "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", - "received_events_url": "https://api.github.com/users/sgoudham/received_events", - "type": "User", - "site_admin": false - } +{ + "action": "created", + "issue": { + "url": "https://api.github.com/repos/catppuccin/java/issues/20", + "repository_url": "https://api.github.com/repos/catppuccin/java", + "labels_url": "https://api.github.com/repos/catppuccin/java/issues/20/labels{/name}", + "comments_url": "https://api.github.com/repos/catppuccin/java/issues/20/comments", + "events_url": "https://api.github.com/repos/catppuccin/java/issues/20/events", + "html_url": "https://github.com/catppuccin/java/issues/20", + "id": 2396591382, + "node_id": "I_kwDOIvYgYM6O2RUW", + "number": 20, + "title": "Reconsider OSSRH Authentication", + "user": { + "login": "sgoudham", + "id": 58985301, + "node_id": "MDQ6VXNlcjU4OTg1MzAx", + "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sgoudham", + "html_url": "https://github.com/sgoudham", + "followers_url": "https://api.github.com/users/sgoudham/followers", + "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", + "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", + "organizations_url": "https://api.github.com/users/sgoudham/orgs", + "repos_url": "https://api.github.com/users/sgoudham/repos", + "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", + "received_events_url": "https://api.github.com/users/sgoudham/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 1, + "created_at": "2024-07-08T21:18:02Z", + "updated_at": "2024-09-14T18:15:15Z", + "closed_at": null, + "author_association": "COLLABORATOR", + "active_lock_reason": null, + "body": "We've received the following email on releases@catppuccin.com\r\n\r\n> Dear Maven Central publisher,\r\n>\r\n> We are making changes to the OSSRH authentication backend. For most users this should be a transparent process, and you should be able to continue to use your existing username and password to connect the Nexus UI. In case you need to update your password, please [follow our documentation](https://central.sonatype.org/register/central-portal/#managing-your-credentials).\r\n>\r\n> To configure a publisher's plugin authentication you would need to update your plugin settings to use [a user token](https://central.sonatype.org/publish/generate-token/) instead of the Nexus UI username and password login.\r\n>\r\n> For more information about publishing to legacy OSSRH please consult our documentation at [https://central.sonatype.org/register/legacy/](https://central.sonatype.org/register/legacy/)\r\n>\r\n> Thank you,\r\n> The Central Team\r\n\r\nI'm a little unsure if we are regarded as a \"publisher\" but we should look to see if we need to switch to a token based authentication workflow.", + "reactions": { + "url": "https://api.github.com/repos/catppuccin/java/issues/20/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/catppuccin/java/issues/20/timeline", + "performed_via_github_app": null, + "state_reason": null + }, + "comment": { + "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061", + "html_url": "https://github.com/catppuccin/java/issues/20#issuecomment-2351090061", + "issue_url": "https://api.github.com/repos/catppuccin/java/issues/20", + "id": 2351090061, + "node_id": "IC_kwDOIvYgYM6MIsmN", + "user": { + "login": "sgoudham", + "id": 58985301, + "node_id": "MDQ6VXNlcjU4OTg1MzAx", + "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sgoudham", + "html_url": "https://github.com/sgoudham", + "followers_url": "https://api.github.com/users/sgoudham/followers", + "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", + "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", + "organizations_url": "https://api.github.com/users/sgoudham/orgs", + "repos_url": "https://api.github.com/users/sgoudham/repos", + "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", + "received_events_url": "https://api.github.com/users/sgoudham/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-09-14T18:15:14Z", + "updated_at": "2024-09-14T18:15:14Z", + "author_association": "COLLABORATOR", + "body": "Testing", + "reactions": { + "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + "repository": { + "id": 586555488, + "node_id": "R_kgDOIvYgYA", + "name": "java", + "full_name": "catppuccin/java", + "private": false, + "owner": { + "login": "catppuccin", + "id": 93489351, + "node_id": "O_kgDOBZKIxw", + "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/catppuccin", + "html_url": "https://github.com/catppuccin", + "followers_url": "https://api.github.com/users/catppuccin/followers", + "following_url": "https://api.github.com/users/catppuccin/following{/other_user}", + "gists_url": "https://api.github.com/users/catppuccin/gists{/gist_id}", + "starred_url": "https://api.github.com/users/catppuccin/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/catppuccin/subscriptions", + "organizations_url": "https://api.github.com/users/catppuccin/orgs", + "repos_url": "https://api.github.com/users/catppuccin/repos", + "events_url": "https://api.github.com/users/catppuccin/events{/privacy}", + "received_events_url": "https://api.github.com/users/catppuccin/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/catppuccin/java", + "description": "☕ Soothing pastel theme for Java", + "fork": false, + "url": "https://api.github.com/repos/catppuccin/java", + "forks_url": "https://api.github.com/repos/catppuccin/java/forks", + "keys_url": "https://api.github.com/repos/catppuccin/java/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/catppuccin/java/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/catppuccin/java/teams", + "hooks_url": "https://api.github.com/repos/catppuccin/java/hooks", + "issue_events_url": "https://api.github.com/repos/catppuccin/java/issues/events{/number}", + "events_url": "https://api.github.com/repos/catppuccin/java/events", + "assignees_url": "https://api.github.com/repos/catppuccin/java/assignees{/user}", + "branches_url": "https://api.github.com/repos/catppuccin/java/branches{/branch}", + "tags_url": "https://api.github.com/repos/catppuccin/java/tags", + "blobs_url": "https://api.github.com/repos/catppuccin/java/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/catppuccin/java/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/catppuccin/java/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/catppuccin/java/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/catppuccin/java/statuses/{sha}", + "languages_url": "https://api.github.com/repos/catppuccin/java/languages", + "stargazers_url": "https://api.github.com/repos/catppuccin/java/stargazers", + "contributors_url": "https://api.github.com/repos/catppuccin/java/contributors", + "subscribers_url": "https://api.github.com/repos/catppuccin/java/subscribers", + "subscription_url": "https://api.github.com/repos/catppuccin/java/subscription", + "commits_url": "https://api.github.com/repos/catppuccin/java/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/catppuccin/java/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/catppuccin/java/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/catppuccin/java/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/catppuccin/java/contents/{+path}", + "compare_url": "https://api.github.com/repos/catppuccin/java/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/catppuccin/java/merges", + "archive_url": "https://api.github.com/repos/catppuccin/java/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/catppuccin/java/downloads", + "issues_url": "https://api.github.com/repos/catppuccin/java/issues{/number}", + "pulls_url": "https://api.github.com/repos/catppuccin/java/pulls{/number}", + "milestones_url": "https://api.github.com/repos/catppuccin/java/milestones{/number}", + "notifications_url": "https://api.github.com/repos/catppuccin/java/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/catppuccin/java/labels{/name}", + "releases_url": "https://api.github.com/repos/catppuccin/java/releases{/id}", + "deployments_url": "https://api.github.com/repos/catppuccin/java/deployments", + "created_at": "2023-01-08T15:00:35Z", + "updated_at": "2024-09-14T18:10:43Z", + "pushed_at": "2024-09-14T18:10:41Z", + "git_url": "git://github.com/catppuccin/java.git", + "ssh_url": "git@github.com:catppuccin/java.git", + "clone_url": "https://github.com/catppuccin/java.git", + "svn_url": "https://github.com/catppuccin/java", + "homepage": "https://search.maven.org/artifact/com.catppuccin/catppuccin-palette", + "size": 109, + "stargazers_count": 15, + "watchers_count": 15, + "language": "Java", + "has_issues": true, + "has_projects": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 4, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "catppuccin", + "hacktoberfest", + "java", + "java-library", + "library" + ], + "visibility": "public", + "forks": 0, + "open_issues": 4, + "watchers": 15, + "default_branch": "main", + "custom_properties": { + "whiskers": "not_applicable" + } + }, + "organization": { + "login": "catppuccin", + "id": 93489351, + "node_id": "O_kgDOBZKIxw", + "url": "https://api.github.com/orgs/catppuccin", + "repos_url": "https://api.github.com/orgs/catppuccin/repos", + "events_url": "https://api.github.com/orgs/catppuccin/events", + "hooks_url": "https://api.github.com/orgs/catppuccin/hooks", + "issues_url": "https://api.github.com/orgs/catppuccin/issues", + "members_url": "https://api.github.com/orgs/catppuccin/members{/member}", + "public_members_url": "https://api.github.com/orgs/catppuccin/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", + "description": "Soothing pastel theme for the high-spirited!" + }, + "sender": { + "login": "sgoudham", + "id": 58985301, + "node_id": "MDQ6VXNlcjU4OTg1MzAx", + "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sgoudham", + "html_url": "https://github.com/sgoudham", + "followers_url": "https://api.github.com/users/sgoudham/followers", + "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", + "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", + "organizations_url": "https://api.github.com/users/sgoudham/orgs", + "repos_url": "https://api.github.com/users/sgoudham/repos", + "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", + "received_events_url": "https://api.github.com/users/sgoudham/received_events", + "type": "User", + "site_admin": false + } } \ No newline at end of file diff --git a/fixtures/comment_deleted.json b/fixtures/comment_deleted.json index b741eb8..dea577d 100644 --- a/fixtures/comment_deleted.json +++ b/fixtures/comment_deleted.json @@ -1,256 +1,256 @@ -{ - "action": "deleted", - "issue": { - "url": "https://api.github.com/repos/catppuccin/java/issues/20", - "repository_url": "https://api.github.com/repos/catppuccin/java", - "labels_url": "https://api.github.com/repos/catppuccin/java/issues/20/labels{/name}", - "comments_url": "https://api.github.com/repos/catppuccin/java/issues/20/comments", - "events_url": "https://api.github.com/repos/catppuccin/java/issues/20/events", - "html_url": "https://github.com/catppuccin/java/issues/20", - "id": 2396591382, - "node_id": "I_kwDOIvYgYM6O2RUW", - "number": 20, - "title": "Reconsider OSSRH Authentication", - "user": { - "login": "sgoudham", - "id": 58985301, - "node_id": "MDQ6VXNlcjU4OTg1MzAx", - "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/sgoudham", - "html_url": "https://github.com/sgoudham", - "followers_url": "https://api.github.com/users/sgoudham/followers", - "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", - "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", - "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", - "organizations_url": "https://api.github.com/users/sgoudham/orgs", - "repos_url": "https://api.github.com/users/sgoudham/repos", - "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", - "received_events_url": "https://api.github.com/users/sgoudham/received_events", - "type": "User", - "site_admin": false - }, - "labels": [], - "state": "open", - "locked": false, - "assignee": null, - "assignees": [], - "milestone": null, - "comments": 1, - "created_at": "2024-07-08T21:18:02Z", - "updated_at": "2024-09-14T18:15:15Z", - "closed_at": null, - "author_association": "COLLABORATOR", - "active_lock_reason": null, - "body": "We've received the following email on releases@catppuccin.com\r\n\r\n> Dear Maven Central publisher,\r\n>\r\n> We are making changes to the OSSRH authentication backend. For most users this should be a transparent process, and you should be able to continue to use your existing username and password to connect the Nexus UI. In case you need to update your password, please [follow our documentation](https://central.sonatype.org/register/central-portal/#managing-your-credentials).\r\n>\r\n> To configure a publisher's plugin authentication you would need to update your plugin settings to use [a user token](https://central.sonatype.org/publish/generate-token/) instead of the Nexus UI username and password login.\r\n>\r\n> For more information about publishing to legacy OSSRH please consult our documentation at [https://central.sonatype.org/register/legacy/](https://central.sonatype.org/register/legacy/)\r\n>\r\n> Thank you,\r\n> The Central Team\r\n\r\nI'm a little unsure if we are regarded as a \"publisher\" but we should look to see if we need to switch to a token based authentication workflow.", - "reactions": { - "url": "https://api.github.com/repos/catppuccin/java/issues/20/reactions", - "total_count": 0, - "+1": 0, - "-1": 0, - "laugh": 0, - "hooray": 0, - "confused": 0, - "heart": 0, - "rocket": 0, - "eyes": 0 - }, - "timeline_url": "https://api.github.com/repos/catppuccin/java/issues/20/timeline", - "performed_via_github_app": null, - "state_reason": null - }, - "comment": { - "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061", - "html_url": "https://github.com/catppuccin/java/issues/20#issuecomment-2351090061", - "issue_url": "https://api.github.com/repos/catppuccin/java/issues/20", - "id": 2351090061, - "node_id": "IC_kwDOIvYgYM6MIsmN", - "user": { - "login": "sgoudham", - "id": 58985301, - "node_id": "MDQ6VXNlcjU4OTg1MzAx", - "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/sgoudham", - "html_url": "https://github.com/sgoudham", - "followers_url": "https://api.github.com/users/sgoudham/followers", - "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", - "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", - "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", - "organizations_url": "https://api.github.com/users/sgoudham/orgs", - "repos_url": "https://api.github.com/users/sgoudham/repos", - "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", - "received_events_url": "https://api.github.com/users/sgoudham/received_events", - "type": "User", - "site_admin": false - }, - "created_at": "2024-09-14T18:15:14Z", - "updated_at": "2024-09-14T18:15:14Z", - "author_association": "COLLABORATOR", - "body": "Testing", - "reactions": { - "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061/reactions", - "total_count": 0, - "+1": 0, - "-1": 0, - "laugh": 0, - "hooray": 0, - "confused": 0, - "heart": 0, - "rocket": 0, - "eyes": 0 - }, - "performed_via_github_app": null - }, - "repository": { - "id": 586555488, - "node_id": "R_kgDOIvYgYA", - "name": "java", - "full_name": "catppuccin/java", - "private": false, - "owner": { - "login": "catppuccin", - "id": 93489351, - "node_id": "O_kgDOBZKIxw", - "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/catppuccin", - "html_url": "https://github.com/catppuccin", - "followers_url": "https://api.github.com/users/catppuccin/followers", - "following_url": "https://api.github.com/users/catppuccin/following{/other_user}", - "gists_url": "https://api.github.com/users/catppuccin/gists{/gist_id}", - "starred_url": "https://api.github.com/users/catppuccin/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/catppuccin/subscriptions", - "organizations_url": "https://api.github.com/users/catppuccin/orgs", - "repos_url": "https://api.github.com/users/catppuccin/repos", - "events_url": "https://api.github.com/users/catppuccin/events{/privacy}", - "received_events_url": "https://api.github.com/users/catppuccin/received_events", - "type": "Organization", - "site_admin": false - }, - "html_url": "https://github.com/catppuccin/java", - "description": "☕ Soothing pastel theme for Java", - "fork": false, - "url": "https://api.github.com/repos/catppuccin/java", - "forks_url": "https://api.github.com/repos/catppuccin/java/forks", - "keys_url": "https://api.github.com/repos/catppuccin/java/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/catppuccin/java/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/catppuccin/java/teams", - "hooks_url": "https://api.github.com/repos/catppuccin/java/hooks", - "issue_events_url": "https://api.github.com/repos/catppuccin/java/issues/events{/number}", - "events_url": "https://api.github.com/repos/catppuccin/java/events", - "assignees_url": "https://api.github.com/repos/catppuccin/java/assignees{/user}", - "branches_url": "https://api.github.com/repos/catppuccin/java/branches{/branch}", - "tags_url": "https://api.github.com/repos/catppuccin/java/tags", - "blobs_url": "https://api.github.com/repos/catppuccin/java/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/catppuccin/java/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/catppuccin/java/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/catppuccin/java/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/catppuccin/java/statuses/{sha}", - "languages_url": "https://api.github.com/repos/catppuccin/java/languages", - "stargazers_url": "https://api.github.com/repos/catppuccin/java/stargazers", - "contributors_url": "https://api.github.com/repos/catppuccin/java/contributors", - "subscribers_url": "https://api.github.com/repos/catppuccin/java/subscribers", - "subscription_url": "https://api.github.com/repos/catppuccin/java/subscription", - "commits_url": "https://api.github.com/repos/catppuccin/java/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/catppuccin/java/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/catppuccin/java/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/catppuccin/java/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/catppuccin/java/contents/{+path}", - "compare_url": "https://api.github.com/repos/catppuccin/java/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/catppuccin/java/merges", - "archive_url": "https://api.github.com/repos/catppuccin/java/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/catppuccin/java/downloads", - "issues_url": "https://api.github.com/repos/catppuccin/java/issues{/number}", - "pulls_url": "https://api.github.com/repos/catppuccin/java/pulls{/number}", - "milestones_url": "https://api.github.com/repos/catppuccin/java/milestones{/number}", - "notifications_url": "https://api.github.com/repos/catppuccin/java/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/catppuccin/java/labels{/name}", - "releases_url": "https://api.github.com/repos/catppuccin/java/releases{/id}", - "deployments_url": "https://api.github.com/repos/catppuccin/java/deployments", - "created_at": "2023-01-08T15:00:35Z", - "updated_at": "2024-09-14T18:10:43Z", - "pushed_at": "2024-09-14T18:10:41Z", - "git_url": "git://github.com/catppuccin/java.git", - "ssh_url": "git@github.com:catppuccin/java.git", - "clone_url": "https://github.com/catppuccin/java.git", - "svn_url": "https://github.com/catppuccin/java", - "homepage": "https://search.maven.org/artifact/com.catppuccin/catppuccin-palette", - "size": 109, - "stargazers_count": 15, - "watchers_count": 15, - "language": "Java", - "has_issues": true, - "has_projects": false, - "has_downloads": true, - "has_wiki": false, - "has_pages": false, - "has_discussions": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 4, - "license": { - "key": "mit", - "name": "MIT License", - "spdx_id": "MIT", - "url": "https://api.github.com/licenses/mit", - "node_id": "MDc6TGljZW5zZTEz" - }, - "allow_forking": true, - "is_template": false, - "web_commit_signoff_required": false, - "topics": [ - "catppuccin", - "hacktoberfest", - "java", - "java-library", - "library" - ], - "visibility": "public", - "forks": 0, - "open_issues": 4, - "watchers": 15, - "default_branch": "main", - "custom_properties": { - "whiskers": "not_applicable" - } - }, - "organization": { - "login": "catppuccin", - "id": 93489351, - "node_id": "O_kgDOBZKIxw", - "url": "https://api.github.com/orgs/catppuccin", - "repos_url": "https://api.github.com/orgs/catppuccin/repos", - "events_url": "https://api.github.com/orgs/catppuccin/events", - "hooks_url": "https://api.github.com/orgs/catppuccin/hooks", - "issues_url": "https://api.github.com/orgs/catppuccin/issues", - "members_url": "https://api.github.com/orgs/catppuccin/members{/member}", - "public_members_url": "https://api.github.com/orgs/catppuccin/public_members{/member}", - "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", - "description": "Soothing pastel theme for the high-spirited!" - }, - "sender": { - "login": "sgoudham", - "id": 58985301, - "node_id": "MDQ6VXNlcjU4OTg1MzAx", - "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/sgoudham", - "html_url": "https://github.com/sgoudham", - "followers_url": "https://api.github.com/users/sgoudham/followers", - "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", - "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", - "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", - "organizations_url": "https://api.github.com/users/sgoudham/orgs", - "repos_url": "https://api.github.com/users/sgoudham/repos", - "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", - "received_events_url": "https://api.github.com/users/sgoudham/received_events", - "type": "User", - "site_admin": false - } +{ + "action": "deleted", + "issue": { + "url": "https://api.github.com/repos/catppuccin/java/issues/20", + "repository_url": "https://api.github.com/repos/catppuccin/java", + "labels_url": "https://api.github.com/repos/catppuccin/java/issues/20/labels{/name}", + "comments_url": "https://api.github.com/repos/catppuccin/java/issues/20/comments", + "events_url": "https://api.github.com/repos/catppuccin/java/issues/20/events", + "html_url": "https://github.com/catppuccin/java/issues/20", + "id": 2396591382, + "node_id": "I_kwDOIvYgYM6O2RUW", + "number": 20, + "title": "Reconsider OSSRH Authentication", + "user": { + "login": "sgoudham", + "id": 58985301, + "node_id": "MDQ6VXNlcjU4OTg1MzAx", + "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sgoudham", + "html_url": "https://github.com/sgoudham", + "followers_url": "https://api.github.com/users/sgoudham/followers", + "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", + "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", + "organizations_url": "https://api.github.com/users/sgoudham/orgs", + "repos_url": "https://api.github.com/users/sgoudham/repos", + "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", + "received_events_url": "https://api.github.com/users/sgoudham/received_events", + "type": "User", + "site_admin": false + }, + "labels": [], + "state": "open", + "locked": false, + "assignee": null, + "assignees": [], + "milestone": null, + "comments": 1, + "created_at": "2024-07-08T21:18:02Z", + "updated_at": "2024-09-14T18:15:15Z", + "closed_at": null, + "author_association": "COLLABORATOR", + "active_lock_reason": null, + "body": "We've received the following email on releases@catppuccin.com\r\n\r\n> Dear Maven Central publisher,\r\n>\r\n> We are making changes to the OSSRH authentication backend. For most users this should be a transparent process, and you should be able to continue to use your existing username and password to connect the Nexus UI. In case you need to update your password, please [follow our documentation](https://central.sonatype.org/register/central-portal/#managing-your-credentials).\r\n>\r\n> To configure a publisher's plugin authentication you would need to update your plugin settings to use [a user token](https://central.sonatype.org/publish/generate-token/) instead of the Nexus UI username and password login.\r\n>\r\n> For more information about publishing to legacy OSSRH please consult our documentation at [https://central.sonatype.org/register/legacy/](https://central.sonatype.org/register/legacy/)\r\n>\r\n> Thank you,\r\n> The Central Team\r\n\r\nI'm a little unsure if we are regarded as a \"publisher\" but we should look to see if we need to switch to a token based authentication workflow.", + "reactions": { + "url": "https://api.github.com/repos/catppuccin/java/issues/20/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "timeline_url": "https://api.github.com/repos/catppuccin/java/issues/20/timeline", + "performed_via_github_app": null, + "state_reason": null + }, + "comment": { + "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061", + "html_url": "https://github.com/catppuccin/java/issues/20#issuecomment-2351090061", + "issue_url": "https://api.github.com/repos/catppuccin/java/issues/20", + "id": 2351090061, + "node_id": "IC_kwDOIvYgYM6MIsmN", + "user": { + "login": "sgoudham", + "id": 58985301, + "node_id": "MDQ6VXNlcjU4OTg1MzAx", + "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sgoudham", + "html_url": "https://github.com/sgoudham", + "followers_url": "https://api.github.com/users/sgoudham/followers", + "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", + "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", + "organizations_url": "https://api.github.com/users/sgoudham/orgs", + "repos_url": "https://api.github.com/users/sgoudham/repos", + "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", + "received_events_url": "https://api.github.com/users/sgoudham/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2024-09-14T18:15:14Z", + "updated_at": "2024-09-14T18:15:14Z", + "author_association": "COLLABORATOR", + "body": "Testing", + "reactions": { + "url": "https://api.github.com/repos/catppuccin/java/issues/comments/2351090061/reactions", + "total_count": 0, + "+1": 0, + "-1": 0, + "laugh": 0, + "hooray": 0, + "confused": 0, + "heart": 0, + "rocket": 0, + "eyes": 0 + }, + "performed_via_github_app": null + }, + "repository": { + "id": 586555488, + "node_id": "R_kgDOIvYgYA", + "name": "java", + "full_name": "catppuccin/java", + "private": false, + "owner": { + "login": "catppuccin", + "id": 93489351, + "node_id": "O_kgDOBZKIxw", + "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/catppuccin", + "html_url": "https://github.com/catppuccin", + "followers_url": "https://api.github.com/users/catppuccin/followers", + "following_url": "https://api.github.com/users/catppuccin/following{/other_user}", + "gists_url": "https://api.github.com/users/catppuccin/gists{/gist_id}", + "starred_url": "https://api.github.com/users/catppuccin/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/catppuccin/subscriptions", + "organizations_url": "https://api.github.com/users/catppuccin/orgs", + "repos_url": "https://api.github.com/users/catppuccin/repos", + "events_url": "https://api.github.com/users/catppuccin/events{/privacy}", + "received_events_url": "https://api.github.com/users/catppuccin/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/catppuccin/java", + "description": "☕ Soothing pastel theme for Java", + "fork": false, + "url": "https://api.github.com/repos/catppuccin/java", + "forks_url": "https://api.github.com/repos/catppuccin/java/forks", + "keys_url": "https://api.github.com/repos/catppuccin/java/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/catppuccin/java/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/catppuccin/java/teams", + "hooks_url": "https://api.github.com/repos/catppuccin/java/hooks", + "issue_events_url": "https://api.github.com/repos/catppuccin/java/issues/events{/number}", + "events_url": "https://api.github.com/repos/catppuccin/java/events", + "assignees_url": "https://api.github.com/repos/catppuccin/java/assignees{/user}", + "branches_url": "https://api.github.com/repos/catppuccin/java/branches{/branch}", + "tags_url": "https://api.github.com/repos/catppuccin/java/tags", + "blobs_url": "https://api.github.com/repos/catppuccin/java/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/catppuccin/java/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/catppuccin/java/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/catppuccin/java/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/catppuccin/java/statuses/{sha}", + "languages_url": "https://api.github.com/repos/catppuccin/java/languages", + "stargazers_url": "https://api.github.com/repos/catppuccin/java/stargazers", + "contributors_url": "https://api.github.com/repos/catppuccin/java/contributors", + "subscribers_url": "https://api.github.com/repos/catppuccin/java/subscribers", + "subscription_url": "https://api.github.com/repos/catppuccin/java/subscription", + "commits_url": "https://api.github.com/repos/catppuccin/java/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/catppuccin/java/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/catppuccin/java/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/catppuccin/java/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/catppuccin/java/contents/{+path}", + "compare_url": "https://api.github.com/repos/catppuccin/java/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/catppuccin/java/merges", + "archive_url": "https://api.github.com/repos/catppuccin/java/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/catppuccin/java/downloads", + "issues_url": "https://api.github.com/repos/catppuccin/java/issues{/number}", + "pulls_url": "https://api.github.com/repos/catppuccin/java/pulls{/number}", + "milestones_url": "https://api.github.com/repos/catppuccin/java/milestones{/number}", + "notifications_url": "https://api.github.com/repos/catppuccin/java/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/catppuccin/java/labels{/name}", + "releases_url": "https://api.github.com/repos/catppuccin/java/releases{/id}", + "deployments_url": "https://api.github.com/repos/catppuccin/java/deployments", + "created_at": "2023-01-08T15:00:35Z", + "updated_at": "2024-09-14T18:10:43Z", + "pushed_at": "2024-09-14T18:10:41Z", + "git_url": "git://github.com/catppuccin/java.git", + "ssh_url": "git@github.com:catppuccin/java.git", + "clone_url": "https://github.com/catppuccin/java.git", + "svn_url": "https://github.com/catppuccin/java", + "homepage": "https://search.maven.org/artifact/com.catppuccin/catppuccin-palette", + "size": 109, + "stargazers_count": 15, + "watchers_count": 15, + "language": "Java", + "has_issues": true, + "has_projects": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 4, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + "catppuccin", + "hacktoberfest", + "java", + "java-library", + "library" + ], + "visibility": "public", + "forks": 0, + "open_issues": 4, + "watchers": 15, + "default_branch": "main", + "custom_properties": { + "whiskers": "not_applicable" + } + }, + "organization": { + "login": "catppuccin", + "id": 93489351, + "node_id": "O_kgDOBZKIxw", + "url": "https://api.github.com/orgs/catppuccin", + "repos_url": "https://api.github.com/orgs/catppuccin/repos", + "events_url": "https://api.github.com/orgs/catppuccin/events", + "hooks_url": "https://api.github.com/orgs/catppuccin/hooks", + "issues_url": "https://api.github.com/orgs/catppuccin/issues", + "members_url": "https://api.github.com/orgs/catppuccin/members{/member}", + "public_members_url": "https://api.github.com/orgs/catppuccin/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/93489351?v=4", + "description": "Soothing pastel theme for the high-spirited!" + }, + "sender": { + "login": "sgoudham", + "id": 58985301, + "node_id": "MDQ6VXNlcjU4OTg1MzAx", + "avatar_url": "https://avatars.githubusercontent.com/u/58985301?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/sgoudham", + "html_url": "https://github.com/sgoudham", + "followers_url": "https://api.github.com/users/sgoudham/followers", + "following_url": "https://api.github.com/users/sgoudham/following{/other_user}", + "gists_url": "https://api.github.com/users/sgoudham/gists{/gist_id}", + "starred_url": "https://api.github.com/users/sgoudham/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/sgoudham/subscriptions", + "organizations_url": "https://api.github.com/users/sgoudham/orgs", + "repos_url": "https://api.github.com/users/sgoudham/repos", + "events_url": "https://api.github.com/users/sgoudham/events{/privacy}", + "received_events_url": "https://api.github.com/users/sgoudham/received_events", + "type": "User", + "site_admin": false + } } \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 93e5278..1bc70aa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,411 +1,445 @@ -use std::sync::Arc; - -use axum::{ - extract::{FromRef, State}, - routing::post, - Router, -}; -use axum_github_webhook_extract::{GithubEvent, GithubToken}; -use serde_json::json; -use tower_http::trace::{DefaultMakeSpan, DefaultOnResponse, TraceLayer}; -use tracing::{error, info, Level}; - -#[derive(serde::Deserialize)] -struct Config { - github_webhook_secret: String, - discord_webhook: String, - discord_bot_webhook: String, - #[serde(default = "default_port")] - port: u16, -} - -const fn default_port() -> u16 { - 3000 -} - -#[derive(Clone)] -struct DiscordHooks { - normal: String, - bot: String, -} - -#[derive(Clone)] -struct AppState { - discord_hooks: DiscordHooks, - github_token: GithubToken, -} - -impl FromRef for GithubToken { - fn from_ref(state: &AppState) -> Self { - state.github_token.clone() - } -} - -#[tokio::main] -async fn main() -> anyhow::Result<()> { - tracing_subscriber::FmtSubscriber::builder() - .with_max_level(Level::TRACE) - .init(); - - let config: Config = envy::from_env()?; - - let app = Router::new() - .route("/webhook", post(webhook)) - .layer( - TraceLayer::new_for_http() - .make_span_with(DefaultMakeSpan::new().level(Level::INFO)) - .on_response(DefaultOnResponse::new().level(Level::INFO)), - ) - .with_state(AppState { - discord_hooks: DiscordHooks { - normal: config.discord_webhook, - bot: config.discord_bot_webhook, - }, - github_token: GithubToken(Arc::new(config.github_webhook_secret)), - }); - - let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", config.port)).await?; - let addr = listener.local_addr()?; - info!(?addr, "listening"); - axum::serve(listener, app) - .with_graceful_shutdown(async { - tokio::signal::ctrl_c().await.ok(); - }) - .await?; - - Ok(()) -} - -enum HookTarget { - Normal, - Bot, - None, -} - -// https://docs.github.com/en/webhooks/webhook-events-and-payloads -#[derive(serde::Deserialize)] -struct Event { - action: String, - sender: User, - repository: Repository, - issue: Option, - comment: Option, - pull_request: Option, - release: Option, - changes: Option, -} - -#[derive(serde::Deserialize)] -struct Repository { - full_name: String, - name: String, - html_url: String, - private: bool, -} - -#[derive(Clone, serde::Deserialize)] -struct User { - login: String, - avatar_url: String, - html_url: String, - #[serde(rename = "type")] - sender_type: String, -} - -#[derive(Clone, serde::Deserialize)] -struct Comment { - body: String, - html_url: String, -} - -#[derive(serde::Deserialize)] -struct Issue { - title: String, - number: u64, - html_url: String, - body: Option, -} - -#[derive(serde::Deserialize)] -struct PullRequest { - title: String, - number: u64, - html_url: String, - body: Option, - merged_at: Option, -} - -#[derive(serde::Deserialize)] -struct Release { - html_url: String, - name: String, -} - -#[derive(serde::Deserialize)] -struct Changes { - owner: Option, - repository: Option, -} - -#[derive(serde::Deserialize)] -struct ChangesOwner { - from: ChangesOwnerFrom, -} - -#[derive(serde::Deserialize)] -struct ChangesOwnerFrom { - user: User, -} - -#[derive(serde::Deserialize)] -struct ChangesRepository { - name: ChangesRepositoryName, -} - -#[derive(serde::Deserialize)] -struct ChangesRepositoryName { - from: String, -} - -async fn webhook(State(app_state): State, GithubEvent(e): GithubEvent) { - match hook_target(&e) { - HookTarget::Normal => { - info!( - hook = &app_state.discord_hooks.normal, - "sending normal hook" - ); - match make_discord_message(&e) { - Ok(Some(msg)) => send_hook(&msg, &app_state.discord_hooks.normal).await, - Ok(None) => info!("no embed created - ignoring event"), - Err(e) => error!(%e, "failed to make discord message"), - } - } - HookTarget::Bot => { - info!(hook = &app_state.discord_hooks.bot, "sending bot hook"); - match make_discord_message(&e) { - Ok(Some(msg)) => send_hook(&msg, &app_state.discord_hooks.bot).await, - Ok(None) => info!("no embed created - ignoring event"), - Err(e) => error!(%e, "failed to make discord message"), - } - } - HookTarget::None => info!("no target - ignoring event"), - } -} - -#[derive(Default)] -struct EmbedBuilder { - title: Option, - url: Option, - author: Option, - description: Option, - color: Option, -} - -impl EmbedBuilder { - fn title(&mut self, title: String) -> &Self { - self.title = Some(title); - self - } - - fn url(&mut self, url: String) -> &Self { - self.url = Some(url); - self - } - - fn author(&mut self, author: User) -> &Self { - self.author = Some(author); - self - } - - fn description(&mut self, description: String) -> &Self { - self.description = Some(description); - self - } - - fn color(&mut self, color: u32) -> &Self { - self.color = Some(color); - self - } - - fn try_build(self) -> anyhow::Result { - Ok(json!({ - "embeds": [{ - "title": self.title.ok_or_else(|| anyhow::anyhow!("missing title"))?, - "url": self.url.ok_or_else(|| anyhow::anyhow!("missing url"))?, - "description": self.description, - "color": self.color, - "author": embed_author(&self.author.ok_or_else(|| anyhow::anyhow!("missing author"))?), - }], - })) - } -} - -fn make_discord_message(e: &Event) -> anyhow::Result> { - let mut embed = EmbedBuilder::default(); - - if e.action == "opened" { - #[allow(clippy::unreadable_literal)] - if e.issue.is_some() { - embed.color(0xeb6420); - } else if e.pull_request.is_some() { - embed.color(0x009800); - } - } - - embed.author(e.sender.clone()); - - if let Some(comment) = &e.comment { - if e.action != "created" { - return Ok(None); - } - if let Some(issue) = &e.issue { - embed.title(format!( - "[{}] New comment on issue #{}: {}", - e.repository.full_name, issue.number, issue.title - )); - #[allow(clippy::unreadable_literal)] - embed.color(0xe68d60); - embed.url(comment.html_url.clone()); - - // limit comment length to 420 characters - if comment.body.len() > 420 { - embed.description(format!("{}...", &comment.body[..420 - 3])); - } else { - embed.description(comment.body.clone()); - } - } else { - return Ok(None); - } - } else if let Some(issue) = &e.issue { - embed.title(format!( - "[{}] Issue {}: #{} {}", - e.repository.full_name, e.action, issue.number, issue.title - )); - - if e.action == "opened" { - if let Some(body) = &issue.body { - embed.description(body.clone()); - } - } - - embed.url(issue.html_url.clone()); - } else if let Some(pull_request) = &e.pull_request { - let action = if e.action == "closed" && pull_request.merged_at.is_some() { - "merged" - } else { - e.action.as_str() - }; - embed.title(format!( - "[{}] Pull request {}: #{} {}", - e.repository.full_name, action, pull_request.number, pull_request.title - )); - - if e.action == "opened" { - if let Some(body) = &pull_request.body { - embed.description(body.clone()); - } - } - - embed.url(pull_request.html_url.clone()); - } else if let Some(release) = &e.release { - if e.action != "released" { - return Ok(None); - } - - embed.title(format!( - "[{}] New release published: {}", - e.repository.full_name, release.name - )); - embed.url(release.html_url.clone()); - } else if let Some(changes) = &e.changes { - if let Some(ChangesOwner { - from: ChangesOwnerFrom { user }, - }) = &changes.owner - { - embed.title(format!( - "[{}] Repository transferred from {}/{}", - e.repository.full_name, user.login, e.repository.name - )); - embed.url(e.repository.html_url.clone()); - } else if let Some(ChangesRepository { - name: ChangesRepositoryName { from }, - }) = &changes.repository - { - embed.title(format!( - "[{}] Repository renamed from {}", - e.repository.full_name, from - )); - embed.url(e.repository.html_url.clone()); - } else { - return Ok(None); - } - } else if matches!(e.action.as_str(), "archived" | "unarchived") { - embed.title(format!( - "[{}] Repository {}", - e.repository.full_name, e.action - )); - embed.url(e.repository.html_url.clone()); - } else { - return Ok(None); - } - - Ok(Some(embed.try_build()?)) -} - -fn embed_author(user: &User) -> serde_json::Value { - json!({ - "name": user.login, - "url": user.html_url, - "icon_url": user.avatar_url, - }) -} - -async fn send_hook(e: &serde_json::Value, hook: &str) { - match reqwest::Client::new().post(hook).json(e).send().await { - Err(e) => error!(%e, "failed to send hook"), - Ok(r) => { - if let Err(e) = r.error_for_status() { - error!(%e, "hook failed"); - } else { - info!("hook sent"); - } - } - } -} - -fn hook_target(e: &Event) -> HookTarget { - if e.sender.sender_type == "Bot" { - return HookTarget::Bot; - } - - if e.repository.private { - info!("ignoring private repository event"); - return HookTarget::None; - } - - HookTarget::Normal -} - -#[cfg(test)] -mod tests { - use crate::{make_discord_message, Event}; - - #[test] - fn test_comment_created() { - let payload = include_str!("../fixtures/comment_created.json"); - let e: Event = serde_json::from_str(payload).unwrap(); - let msg = make_discord_message(&e).unwrap().unwrap(); - assert_eq!( - msg["embeds"][0]["title"].as_str().unwrap(), - "[catppuccin/java] New comment on issue #20: Reconsider OSSRH Authentication" - ); - } - - #[test] - fn test_comment_deleted() { - let payload = include_str!("../fixtures/comment_deleted.json"); - let e: Event = serde_json::from_str(payload).unwrap(); - let msg = make_discord_message(&e).unwrap(); - assert!(msg.is_none()); - } -} +use std::sync::Arc; + +use axum::{ + extract::{FromRef, State}, + routing::post, + Router, +}; +use axum_github_webhook_extract::{GithubEvent, GithubToken}; +use serde_json::json; +use tower_http::trace::{DefaultMakeSpan, DefaultOnResponse, TraceLayer}; +use tracing::{error, info, Level}; + +const MAX_TITLE_LENGTH: usize = 100; +const MAX_DESCRIPTION_LENGTH: usize = 640; +const MAX_AUTHOR_NAME_LENGTH: usize = 256; + +#[derive(serde::Deserialize)] +struct Config { + github_webhook_secret: String, + discord_webhook: String, + discord_bot_webhook: String, + #[serde(default = "default_port")] + port: u16, +} + +const fn default_port() -> u16 { + 3000 +} + +#[derive(Clone)] +struct DiscordHooks { + normal: String, + bot: String, +} + +#[derive(Clone)] +struct AppState { + discord_hooks: DiscordHooks, + github_token: GithubToken, +} + +impl FromRef for GithubToken { + fn from_ref(state: &AppState) -> Self { + state.github_token.clone() + } +} + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + tracing_subscriber::FmtSubscriber::builder() + .with_max_level(Level::TRACE) + .init(); + + let config: Config = envy::from_env()?; + + let app = Router::new() + .route("/webhook", post(webhook)) + .layer( + TraceLayer::new_for_http() + .make_span_with(DefaultMakeSpan::new().level(Level::INFO)) + .on_response(DefaultOnResponse::new().level(Level::INFO)), + ) + .with_state(AppState { + discord_hooks: DiscordHooks { + normal: config.discord_webhook, + bot: config.discord_bot_webhook, + }, + github_token: GithubToken(Arc::new(config.github_webhook_secret)), + }); + + let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", config.port)).await?; + let addr = listener.local_addr()?; + info!(?addr, "listening"); + axum::serve(listener, app) + .with_graceful_shutdown(async { + tokio::signal::ctrl_c().await.ok(); + }) + .await?; + + Ok(()) +} + +enum HookTarget { + Normal, + Bot, + None, +} + +// https://docs.github.com/en/webhooks/webhook-events-and-payloads +#[derive(serde::Deserialize)] +struct Event { + action: String, + sender: User, + repository: Repository, + issue: Option, + comment: Option, + pull_request: Option, + release: Option, + changes: Option, +} + +#[derive(serde::Deserialize)] +struct Repository { + full_name: String, + name: String, + html_url: String, + private: bool, +} + +#[derive(Clone, Debug, serde::Deserialize)] +struct User { + login: String, + avatar_url: String, + html_url: String, + #[serde(rename = "type")] + sender_type: String, +} + +#[derive(Clone, serde::Deserialize)] +struct Comment { + body: String, + html_url: String, +} + +#[derive(serde::Deserialize)] +struct Issue { + title: String, + number: u64, + html_url: String, + body: Option, +} + +#[derive(serde::Deserialize)] +struct PullRequest { + title: String, + number: u64, + html_url: String, + body: Option, + merged_at: Option, +} + +#[derive(serde::Deserialize)] +struct Release { + html_url: String, + name: String, +} + +#[derive(serde::Deserialize)] +struct Changes { + owner: Option, + repository: Option, +} + +#[derive(serde::Deserialize)] +struct ChangesOwner { + from: ChangesOwnerFrom, +} + +#[derive(serde::Deserialize)] +struct ChangesOwnerFrom { + user: User, +} + +#[derive(serde::Deserialize)] +struct ChangesRepository { + name: ChangesRepositoryName, +} + +#[derive(serde::Deserialize)] +struct ChangesRepositoryName { + from: String, +} + +async fn webhook(State(app_state): State, GithubEvent(e): GithubEvent) { + match hook_target(&e) { + HookTarget::Normal => { + info!( + hook = &app_state.discord_hooks.normal, + "sending normal hook" + ); + match make_discord_message(&e) { + Ok(Some(msg)) => send_hook(&msg, &app_state.discord_hooks.normal).await, + Ok(None) => info!("no embed created - ignoring event"), + Err(e) => error!(%e, "failed to make discord message"), + } + } + HookTarget::Bot => { + info!(hook = &app_state.discord_hooks.bot, "sending bot hook"); + match make_discord_message(&e) { + Ok(Some(msg)) => send_hook(&msg, &app_state.discord_hooks.bot).await, + Ok(None) => info!("no embed created - ignoring event"), + Err(e) => error!(%e, "failed to make discord message"), + } + } + HookTarget::None => info!("no target - ignoring event"), + } +} + +#[derive(Default, Debug)] +struct EmbedBuilder { + title: Option, + url: Option, + author: Option, + description: Option, + color: Option, +} + +impl EmbedBuilder { + fn title(&mut self, title: &str) -> &Self { + self.title = Some(limit_text_length(title, MAX_TITLE_LENGTH)); + self + } + + fn url(&mut self, url: &str) -> &Self { + self.url = Some(url.to_string()); + self + } + + fn author(&mut self, author: User) -> &Self { + self.author = Some(author); + self + } + + fn description(&mut self, description: &str) -> &Self { + self.description = Some(limit_text_length(description, MAX_DESCRIPTION_LENGTH)); + self + } + + fn color(&mut self, color: u32) -> &Self { + self.color = Some(color); + self + } + + fn try_build(self) -> anyhow::Result { + Ok(json!({ + "embeds": [{ + "title": self.title.ok_or_else(|| anyhow::anyhow!("missing title"))?, + "url": self.url.ok_or_else(|| anyhow::anyhow!("missing url"))?, + "description": self.description, + "color": self.color, + "author": embed_author(&self.author.ok_or_else(|| anyhow::anyhow!("missing author"))?), + }], + })) + } +} + +fn embed_author(user: &User) -> serde_json::Value { + json!({ + "name": limit_text_length(&user.login, MAX_AUTHOR_NAME_LENGTH), + "url": user.html_url, + "icon_url": user.avatar_url, + }) +} + +fn limit_text_length(text: &str, max_length: usize) -> String { + if text.len() > max_length { + format!("{}...", &text[..max_length - 3]) + } else { + text.to_string() + } +} + +fn make_discord_message(e: &Event) -> anyhow::Result> { + let mut embed = EmbedBuilder::default(); + + if e.action == "opened" { + #[allow(clippy::unreadable_literal)] + if e.issue.is_some() { + embed.color(0xeb6420); + } else if e.pull_request.is_some() { + embed.color(0x009800); + } + } + + embed.author(e.sender.clone()); + + if let Some(comment) = &e.comment { + if e.action != "created" { + return Ok(None); + } + if let Some(issue) = &e.issue { + embed.title(&format!( + "[{}] New comment on issue #{}: {}", + e.repository.full_name, issue.number, issue.title + )); + #[allow(clippy::unreadable_literal)] + embed.color(0xe68d60); + embed.url(&comment.html_url); + embed.description(&comment.body); + } else { + return Ok(None); + } + } else if let Some(issue) = &e.issue { + embed.title(&format!( + "[{}] Issue {}: #{} {}", + e.repository.full_name, e.action, issue.number, issue.title + )); + + if e.action == "opened" { + if let Some(body) = &issue.body { + embed.description(body); + } + } + + embed.url(&issue.html_url); + } else if let Some(pull_request) = &e.pull_request { + let action = if e.action == "closed" && pull_request.merged_at.is_some() { + "merged" + } else { + e.action.as_str() + }; + embed.title(&format!( + "[{}] Pull request {}: #{} {}", + e.repository.full_name, action, pull_request.number, pull_request.title + )); + + if e.action == "opened" { + if let Some(body) = &pull_request.body { + embed.description(body); + } + } + + embed.url(&pull_request.html_url); + } else if let Some(release) = &e.release { + if e.action != "released" { + return Ok(None); + } + + embed.title(&format!( + "[{}] New release published: {}", + e.repository.full_name, release.name + )); + embed.url(&release.html_url); + } else if let Some(changes) = &e.changes { + if let Some(ChangesOwner { + from: ChangesOwnerFrom { user }, + }) = &changes.owner + { + embed.title(&format!( + "[{}] Repository transferred from {}/{}", + e.repository.full_name, user.login, e.repository.name + )); + embed.url(&e.repository.html_url); + } else if let Some(ChangesRepository { + name: ChangesRepositoryName { from }, + }) = &changes.repository + { + embed.title(&format!( + "[{}] Repository renamed from {}", + e.repository.full_name, from + )); + embed.url(&e.repository.html_url); + } else { + return Ok(None); + } + } else if matches!(e.action.as_str(), "archived" | "unarchived") { + embed.title(&format!( + "[{}] Repository {}", + e.repository.full_name, e.action + )); + embed.url(&e.repository.html_url); + } else { + return Ok(None); + } + + Ok(Some(embed.try_build()?)) +} + +async fn send_hook(e: &serde_json::Value, hook: &str) { + match reqwest::Client::new().post(hook).json(e).send().await { + Err(e) => error!(%e, "failed to send hook"), + Ok(r) => { + if let Err(e) = r.error_for_status() { + error!(%e, "hook failed"); + } else { + info!("hook sent"); + } + } + } +} + +fn hook_target(e: &Event) -> HookTarget { + if e.sender.sender_type == "Bot" { + return HookTarget::Bot; + } + + if e.repository.private { + info!("ignoring private repository event"); + return HookTarget::None; + } + + HookTarget::Normal +} + +#[cfg(test)] +mod tests { + use crate::{make_discord_message, Event}; + + #[test] + fn test_comment_created() { + let payload = include_str!("../fixtures/comment_created.json"); + let e: Event = serde_json::from_str(payload).unwrap(); + let msg = make_discord_message(&e).unwrap().unwrap(); + assert_eq!( + msg["embeds"][0]["title"].as_str().unwrap(), + "[catppuccin/java] New comment on issue #20: Reconsider OSSRH Authentication" + ); + } + + #[test] + fn test_comment_deleted() { + let payload = include_str!("../fixtures/comment_deleted.json"); + let e: Event = serde_json::from_str(payload).unwrap(); + let msg = make_discord_message(&e).unwrap(); + assert!(msg.is_none()); + } + + #[test] + fn test_bot_pull_request_opened() { + let payload = include_str!("../fixtures/bot_pull_request_opened.json"); + let e: Event = serde_json::from_str(payload).unwrap(); + let msg = make_discord_message(&e).unwrap().unwrap(); + assert_eq!( + msg["embeds"][0]["title"].as_str().unwrap(), + "[catppuccin-rfc/cli-old] Pull request opened: #1 chore: Configure Renovate" + ); + } + + #[test] + fn test_limit_description_on_pull_request() { + let payload = include_str!("../fixtures/bot_pull_request_opened.json"); + let e: Event = serde_json::from_str(payload).unwrap(); + let msg = make_discord_message(&e).unwrap().unwrap(); + assert_eq!( + msg["embeds"][0]["description"] + .as_str() + .unwrap() + .split_once('!') + .unwrap() + .0, + "Welcome to [Renovate](https://redirect.github.com/renovatebot/renovate)" + ); + assert_eq!(msg["embeds"][0]["description"].as_str().unwrap().len(), 640); + } +}