diff --git a/package.json b/package.json index 1e0112b..45c5a4b 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,9 @@ "pnpm": { "onlyBuiltDependencies": [ "esbuild" - ] + ], + "overrides": { + "fast-xml-parser": "^5.3.5" + } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 006aba5..4d61ca0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + fast-xml-parser: ^5.3.5 + importers: .: @@ -556,6 +559,9 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@nodable/entities@2.1.0': + resolution: {integrity: sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==} + '@octokit/auth-app@8.2.0': resolution: {integrity: sha512-vVjdtQQwomrZ4V46B9LaCsxsySxGoHsyw6IYBov/TqJVROrlYdyNgw5q6tQbB7KZt53v1l1W53RiqTvpzL907g==} engines: {node: '>= 20'} @@ -1048,8 +1054,11 @@ packages: fast-content-type-parse@3.0.0: resolution: {integrity: sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==} - fast-xml-parser@5.2.5: - resolution: {integrity: sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==} + fast-xml-builder@1.1.7: + resolution: {integrity: sha512-Yh7/7rQuMXICNr0oMYDR2yHP6oUvmQsTToFeOWj/kIDhAwQ+c4Ol/lbcwOmEM5OHYQmh6S6EQSQ1sljCKP36bQ==} + + fast-xml-parser@5.7.2: + resolution: {integrity: sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==} hasBin: true fdir@6.5.0: @@ -1114,6 +1123,10 @@ packages: obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} + path-expression-matcher@1.5.0: + resolution: {integrity: sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==} + engines: {node: '>=14.0.0'} + pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -1746,7 +1759,7 @@ snapshots: '@aws-sdk/xml-builder@3.972.0': dependencies: '@smithy/types': 4.14.0 - fast-xml-parser: 5.2.5 + fast-xml-parser: 5.7.2 tslib: 2.8.1 '@aws/lambda-invoke-store@0.2.4': {} @@ -1956,6 +1969,8 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@nodable/entities@2.1.0': {} + '@octokit/auth-app@8.2.0': dependencies: '@octokit/auth-oauth-app': 9.0.3 @@ -2562,8 +2577,15 @@ snapshots: fast-content-type-parse@3.0.0: {} - fast-xml-parser@5.2.5: + fast-xml-builder@1.1.7: + dependencies: + path-expression-matcher: 1.5.0 + + fast-xml-parser@5.7.2: dependencies: + '@nodable/entities': 2.1.0 + fast-xml-builder: 1.1.7 + path-expression-matcher: 1.5.0 strnum: 2.2.3 fdir@6.5.0(picomatch@4.0.4): @@ -2619,6 +2641,8 @@ snapshots: obug@2.1.1: {} + path-expression-matcher@1.5.0: {} + pathe@2.0.3: {} picocolors@1.1.1: {} diff --git a/review-pr/action.yml b/review-pr/action.yml index 4b85670..c074e08 100644 --- a/review-pr/action.yml +++ b/review-pr/action.yml @@ -87,9 +87,12 @@ runs: - name: Resolve PR number and comment ID id: resolve-context shell: bash + env: + PR_NUMBER_INPUT: ${{ inputs.pr-number }} + COMMENT_ID_INPUT: ${{ inputs.comment-id }} run: | # Resolve PR number: input > pull_request event > issue event - PR_NUMBER="${{ inputs.pr-number }}" + PR_NUMBER="$PR_NUMBER_INPUT" if [ -z "$PR_NUMBER" ]; then PR_NUMBER="${{ github.event.pull_request.number }}" fi @@ -104,7 +107,7 @@ runs: echo "✅ Resolved PR number: $PR_NUMBER" # Resolve comment ID: input > comment event (optional, for reactions) - COMMENT_ID="${{ inputs.comment-id }}" + COMMENT_ID="$COMMENT_ID_INPUT" if [ -z "$COMMENT_ID" ]; then COMMENT_ID="${{ github.event.comment.id }}" fi @@ -203,8 +206,10 @@ runs: shell: bash env: GH_TOKEN: ${{ steps.resolve-token.outputs.token }} + REPO: ${{ github.repository }} + COMMENT_ID: ${{ steps.resolve-context.outputs.comment-id }} run: | - gh api repos/${{ github.repository }}/issues/comments/${{ steps.resolve-context.outputs.comment-id }}/reactions \ + gh api "repos/$REPO/issues/comments/$COMMENT_ID/reactions" \ -X POST -f content='eyes' || true - name: Get PR information @@ -628,8 +633,9 @@ runs: shell: bash env: GH_TOKEN: ${{ steps.resolve-token.outputs.token }} + REPO: ${{ github.repository }} run: | - ARTIFACTS=$(gh api "repos/${{ github.repository }}/actions/artifacts?name=pr-review-feedback" \ + ARTIFACTS=$(gh api "repos/$REPO/actions/artifacts?name=pr-review-feedback" \ --jq '.artifacts[].id' 2>/dev/null || echo "") if [ -z "$ARTIFACTS" ]; then @@ -644,7 +650,7 @@ runs: for AID in $ARTIFACTS; do # Download artifact zip - gh api "repos/${{ github.repository }}/actions/artifacts/$AID/zip" > "feedback_$AID.zip" 2>/dev/null || continue + gh api "repos/$REPO/actions/artifacts/$AID/zip" > "feedback_$AID.zip" 2>/dev/null || continue unzip -o "feedback_$AID.zip" -d "pending_feedback/" 2>/dev/null || continue if [ -f pending_feedback/feedback.json ]; then @@ -660,7 +666,7 @@ runs: rm -f pending_feedback/feedback.json # Delete processed artifact - gh api "repos/${{ github.repository }}/actions/artifacts/$AID" -X DELETE 2>/dev/null || true + gh api "repos/$REPO/actions/artifacts/$AID" -X DELETE 2>/dev/null || true done if [ "$COUNT" -gt 0 ]; then @@ -907,11 +913,13 @@ runs: env: GH_TOKEN: ${{ steps.resolve-token.outputs.token }} EXIT_CODE: ${{ steps.run-review.outputs.exit-code }} + REPO: ${{ github.repository }} + COMMENT_ID: ${{ steps.resolve-context.outputs.comment-id }} run: | if [ "$EXIT_CODE" != "0" ]; then - gh api "repos/${{ github.repository }}/issues/comments/${{ steps.resolve-context.outputs.comment-id }}/reactions" \ + gh api "repos/$REPO/issues/comments/$COMMENT_ID/reactions" \ -X POST -f content='confused' || true else - gh api "repos/${{ github.repository }}/issues/comments/${{ steps.resolve-context.outputs.comment-id }}/reactions" \ + gh api "repos/$REPO/issues/comments/$COMMENT_ID/reactions" \ -X POST -f content='+1' || true fi