diff --git a/.github/workflows/checksum.yaml b/.github/workflows/checksum.yaml index fc51211..b7fb942 100644 --- a/.github/workflows/checksum.yaml +++ b/.github/workflows/checksum.yaml @@ -26,12 +26,31 @@ jobs: else exit 1 fi + - uses: actions/github-script@v7 + continue-on-error: true + id: get_issue_number + with: + script: | + if (context.issue.number) { + // Return issue number if present + return context.issue.number; + } else { + // Otherwise return issue number from commit + return ( + await github.rest.repos.listPullRequestsAssociatedWithCommit({ + commit_sha: context.sha, + owner: context.repo.owner, + repo: context.repo.repo, + }) + ).data[0].number; + } + result-encoding: string - name: Create or update comment continue-on-error: true if: failure() uses: peter-evans/create-or-update-comment@v4 with: - issue-number: ${{ github.event.pull_request.number }} + issue-number: ${{steps.get_issue_number.outputs.result}} body: | Invalid checksums, please run `./generate_checksum.sh` \ No newline at end of file diff --git a/.github/workflows/dart_bindings.yaml b/.github/workflows/dart_bindings.yaml index 6ea5567..a129853 100644 --- a/.github/workflows/dart_bindings.yaml +++ b/.github/workflows/dart_bindings.yaml @@ -27,12 +27,31 @@ jobs: else exit 1 fi + - uses: actions/github-script@v7 + continue-on-error: true + id: get_issue_number + with: + script: | + if (context.issue.number) { + // Return issue number if present + return context.issue.number; + } else { + // Otherwise return issue number from commit + return ( + await github.rest.repos.listPullRequestsAssociatedWithCommit({ + commit_sha: context.sha, + owner: context.repo.owner, + repo: context.repo.repo, + }) + ).data[0].number; + } + result-encoding: string - name: Create or update comment continue-on-error: true if: failure() uses: peter-evans/create-or-update-comment@v4 with: - issue-number: ${{ github.event.pull_request.number }} + issue-number: ${{steps.get_issue_number.outputs.result}} body: | Invalid bindings found in monero.dart, make sure to run `./impls/monero.dart/update_bindings.sh` \ No newline at end of file diff --git a/impls/monero.dart/lib/src/checksum_wownero.dart b/impls/monero.dart/lib/src/checksum_wownero.dart index a6d5358..f4ed1e7 100644 --- a/impls/monero.dart/lib/src/checksum_wownero.dart +++ b/impls/monero.dart/lib/src/checksum_wownero.dart @@ -1,4 +1,4 @@ // ignore_for_file: constant_identifier_names const String wallet2_api_c_h_sha256 = "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77"; const String wallet2_api_c_cpp_sha256 = "ed400bd9c4709383ffd42a9fbe68be37a2a47a42f92eacaf3a2dbd248c422739"; -const String wallet2_api_c_exp_sha256 = "dd9874cc43a6a74bbfa3e49c4ad3f835ff22efd3de8f679cc91c4af3d931aedb"; +const String wallet2_api_c_exp_sha256 = "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4"; diff --git a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h index cec77a5..a28e9fd 100644 --- a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h +++ b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h @@ -2,5 +2,5 @@ #define MONEROC_CHECKSUMS const char * WOWNERO_wallet2_api_c_h_sha256 = "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77"; const char * WOWNERO_wallet2_api_c_cpp_sha256 = "ed400bd9c4709383ffd42a9fbe68be37a2a47a42f92eacaf3a2dbd248c422739"; -const char * WOWNERO_wallet2_api_c_exp_sha256 = "dd9874cc43a6a74bbfa3e49c4ad3f835ff22efd3de8f679cc91c4af3d931aedb"; +const char * WOWNERO_wallet2_api_c_exp_sha256 = "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4"; #endif diff --git a/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp b/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp index 5b3a81f..988e481 100644 --- a/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp +++ b/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp @@ -285,5 +285,3 @@ _WOWNERO_free _WOWNERO_checksum_wallet2_api_c_h _WOWNERO_checksum_wallet2_api_c_cpp _WOWNERO_checksum_wallet2_api_c_exp -_WOWNERO_checksum_wallet2_api_c_version -_WOWNERO_checksum_wallet2_api_c_date \ No newline at end of file