diff --git a/.github/workflows/gh_pr_llm_review_comment.yml b/.github/workflows/gh_pr_llm_review_comment.yml new file mode 100644 index 00000000000..e1135056053 --- /dev/null +++ b/.github/workflows/gh_pr_llm_review_comment.yml @@ -0,0 +1,28 @@ +name: '[gh] pr add review comment' + +on: + workflow_dispatch: + inputs: + pull_request_number: + description: 'Pull request number to comment on' + required: true + type: number + body: + description: 'Comment body to post on the pull request' + required: true + type: string + +jobs: + add_review_comment: + if: github.repository == 'Tencent/Hippy' + runs-on: ubuntu-latest + steps: + - name: Post comment to pull request + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMENT_BODY: ${{ inputs.body }} + run: | + gh pr comment ${{ inputs.pull_request_number }} \ + --body "$COMMENT_BODY" \ + --repo "$GITHUB_REPOSITORY" + diff --git a/.husky/post-checkout b/.husky/post-checkout index ca7fcb40088..5abf8ed93f7 100755 --- a/.husky/post-checkout +++ b/.husky/post-checkout @@ -1,3 +1,3 @@ #!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } git lfs post-checkout "$@" diff --git a/.husky/post-commit b/.husky/post-commit index 52b339cb3f4..b8b76c2c425 100755 --- a/.husky/post-commit +++ b/.husky/post-commit @@ -1,3 +1,3 @@ #!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } git lfs post-commit "$@" diff --git a/.husky/post-merge b/.husky/post-merge index a912e667aa3..726f909891a 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -1,3 +1,3 @@ #!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } git lfs post-merge "$@" diff --git a/.husky/pre-push b/.husky/pre-push index 0f0089bc25d..5f26dc45523 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,3 +1,3 @@ #!/bin/sh -command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } +command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } git lfs pre-push "$@" diff --git a/driver/js/include/driver/napi/jsc/jsc_ctx.h b/driver/js/include/driver/napi/jsc/jsc_ctx.h index b556eda393b..ff840544a6f 100644 --- a/driver/js/include/driver/napi/jsc/jsc_ctx.h +++ b/driver/js/include/driver/napi/jsc/jsc_ctx.h @@ -61,6 +61,9 @@ struct ConstructorData { ConstructorData(void* func_wrapper, std::shared_ptrprototype, JSClassRef ref): function_wrapper(func_wrapper), prototype(prototype), weak_callback_wrapper(nullptr), class_ref(ref), object_data_map({}) {} ~ConstructorData() { JSClassRelease(class_ref); + function_wrapper = nullptr; + prototype = nullptr; + weak_callback_wrapper = nullptr; } };