Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Unhandled error: HttpError: Resource not accessible by integration" Error #3

Closed
maltfield opened this issue Aug 7, 2024 · 7 comments

Comments

@maltfield
Copy link
Owner

This ticket will track the effort to fix an error that prevents this workflow from actually being able to comment on the PR, due to the following error

Unhandled error: HttpError: Resource not accessible by integration
@maltfield
Copy link
Owner Author

For example, this PR in the buskill-app repo fails:

Here's the raw log of the GitHub Actions run:

2024-08-07T03:11:38.5331103Z + [[ '' == '' ]]
2024-08-07T03:11:38.5332280Z + human_result='INFO: No unicode characters found in PR'\''s commits'
2024-08-07T03:11:38.5336081Z + echo 'INFO: No unicode characters found in PR'\''s commits'
2024-08-07T03:11:38.5338455Z + echo 'UNICODE_HUMAN_RESULT=INFO: No unicode characters found in PR'\''s commits'
2024-08-07T03:11:38.5339885Z INFO: No unicode characters found in PR's commits
2024-08-07T03:11:38.5451388Z ##[group]Run actions/github-script@v5
2024-08-07T03:11:38.5451908Z with:
2024-08-07T03:11:38.5452582Z   github-token: ***
2024-08-07T03:11:38.5453628Z   script: github.rest.issues.createComment({
  issue_number: context.issue.number,
  owner: context.repo.owner,
  repo: context.repo.repo,
  body: "INFO: No unicode characters found in PR's commits"
})

2024-08-07T03:11:38.5454671Z   debug: false
2024-08-07T03:11:38.5455100Z   user-agent: actions/github-script
2024-08-07T03:11:38.5455513Z   result-encoding: json
2024-08-07T03:11:38.5455836Z env:
2024-08-07T03:11:38.5456341Z   UNICODE_HUMAN_RESULT: INFO: No unicode characters found in PR's commits
2024-08-07T03:11:38.5456893Z ##[endgroup]
2024-08-07T03:11:38.5555448Z ##[command]/usr/bin/docker exec  b1f250c3377e75150a3d45a71469734b6ba6476ca67d030708370cebd975ea6e sh -c "cat /etc/*release | grep ^ID"
2024-08-07T03:11:38.9684235Z (node:3064) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
2024-08-07T03:11:38.9686831Z (Use `node --trace-deprecation ...` to show where the warning was created)
2024-08-07T03:11:39.1266032Z RequestError [HttpError]: Resource not accessible by integration
2024-08-07T03:11:39.1268003Z     at /__w/_actions/actions/github-script/v5/dist/index.js:4560:21
2024-08-07T03:11:39.1269743Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
2024-08-07T03:11:39.1271074Z   status: 403,
2024-08-07T03:11:39.1271696Z   response: {
2024-08-07T03:11:39.1273175Z     url: 'https://api.github.com/repos/BusKill/buskill-app/issues/90/comments',
2024-08-07T03:11:39.1274330Z     status: 403,
2024-08-07T03:11:39.1274921Z     headers: {
2024-08-07T03:11:39.1276229Z       'access-control-allow-origin': '*',
2024-08-07T03:11:39.1279652Z       'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
2024-08-07T03:11:39.1281829Z       'content-encoding': 'gzip',
2024-08-07T03:11:39.1282474Z       'content-security-policy': "default-src 'none'",
2024-08-07T03:11:39.1283058Z       'content-type': 'application/json; charset=utf-8',
2024-08-07T03:11:39.1283649Z       date: 'Wed, 07 Aug 2024 03:11:39 GMT',
2024-08-07T03:11:39.1284444Z       'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
2024-08-07T03:11:39.1285083Z       server: 'github.com',
2024-08-07T03:11:39.1285737Z       'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
2024-08-07T03:11:39.1286445Z       'transfer-encoding': 'chunked',
2024-08-07T03:11:39.1286936Z       vary: 'Accept-Encoding, Accept, X-Requested-With',
2024-08-07T03:11:39.1287648Z       'x-accepted-github-permissions': 'issues=write; pull_requests=write',
2024-08-07T03:11:39.1288341Z       'x-content-type-options': 'nosniff',
2024-08-07T03:11:39.1288819Z       'x-frame-options': 'deny',
2024-08-07T03:11:39.1289271Z       'x-github-api-version-selected': '2022-11-28',
2024-08-07T03:11:39.1289854Z       'x-github-media-type': 'github.v3',
2024-08-07T03:11:39.1290466Z       'x-github-request-id': '1C80:311789:119351FB:20B12985:66B2E5EA',
2024-08-07T03:11:39.1290983Z       'x-ratelimit-limit': '5000',
2024-08-07T03:11:39.1291488Z       'x-ratelimit-remaining': '4999',
2024-08-07T03:11:39.1291959Z       'x-ratelimit-reset': '1723003899',
2024-08-07T03:11:39.1292398Z       'x-ratelimit-resource': 'core',
2024-08-07T03:11:39.1292901Z       'x-ratelimit-used': '1',
2024-08-07T03:11:39.1293337Z       'x-xss-protection': '0'
2024-08-07T03:11:39.1293662Z     },
2024-08-07T03:11:39.1294030Z     data: {
2024-08-07T03:11:39.1294462Z       message: 'Resource not accessible by integration',
2024-08-07T03:11:39.1296727Z       documentation_url: 'https://docs.github.com/rest/issues/comments#create-an-issue-comment',
2024-08-07T03:11:39.1297757Z       status: '403'
2024-08-07T03:11:39.1298106Z     }
2024-08-07T03:11:39.1298364Z   },
2024-08-07T03:11:39.1298712Z   request: {
2024-08-07T03:11:39.1299074Z     method: 'POST',
2024-08-07T03:11:39.1299623Z     url: 'https://api.github.com/repos/BusKill/buskill-app/issues/90/comments',
2024-08-07T03:11:39.1300274Z     headers: {
2024-08-07T03:11:39.1300736Z       accept: 'application/vnd.github.-preview+json',
2024-08-07T03:11:39.1301462Z       'user-agent': 'actions/github-script octokit-core.js/3.5.1 Node.js/20.13.1 (linux; x64)',
2024-08-07T03:11:39.1302205Z       authorization: 'token [REDACTED]',
2024-08-07T03:11:39.1302750Z       'content-type': 'application/json; charset=utf-8'
2024-08-07T03:11:39.1303166Z     },
2024-08-07T03:11:39.1303733Z     body: `{"body":"INFO: No unicode characters found in PR's commits"}`,
2024-08-07T03:11:39.1304586Z     request: { agent: [Agent], hook: [Function: bound bound register] }
2024-08-07T03:11:39.1305409Z   }
2024-08-07T03:11:39.1305974Z }
2024-08-07T03:11:39.1363181Z ##[error]Unhandled error: HttpError: Resource not accessible by integration
2024-08-07T03:11:39.1429628Z Stop and remove container: 3a0fb15715a44d73a74e5fed6086be69_debianbullseyeslim_e1f6ef
2024-08-07T03:11:39.1435038Z ##[command]/usr/bin/docker rm --force b1f250c3377e75150a3d45a71469734b6ba6476ca67d030708370cebd975ea6e
2024-08-07T03:11:39.8909555Z b1f250c3377e75150a3d45a71469734b6ba6476ca67d030708370cebd975ea6e
2024-08-07T03:11:39.8945879Z Remove container network: github_network_8f16aac5a43d49f2bc4a82c532242578
2024-08-07T03:11:39.8951176Z ##[command]/usr/bin/docker network rm github_network_8f16aac5a43d49f2bc4a82c532242578
2024-08-07T03:11:40.1777839Z github_network_8f16aac5a43d49f2bc4a82c532242578
2024-08-07T03:11:40.1935127Z Cleaning up orphan processes

Source: https://github.com/BusKill/buskill-app/actions/runs/10277474339/job/28439576643?pr=90

@maltfield
Copy link
Owner Author

Looks like maybe I just have to add two write permissions to the workflow file

@maltfield
Copy link
Owner Author

Oh wow, so I fixed the permissions so that it can comment on the PR, but it said there's no malicious bidi unicode when there is. Perhaps I never tested it with a PR with >1 commit?

@maltfield
Copy link
Owner Author

So the diff we're doing is

diff=`git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E "^[+]" | grep -Ev '^(--- a/|\+\+\+ b/)'`

I would expect github.event.pull_request.base.sha and github.event.pull_request.head.sha to be correct, but it looks like it's not.

Something about merging something from main back into our malicious branch bypasses these errors. There is no malicious unicode in the main branch. There is malicious unicode in the PR branch. But the workflow says there's no unicdoe found.

Looks like it gives an error

2024-08-07T18:13:02.3682344Z ++ git diff --unified=0 a374a29cb6805893724c1b0fd023c0335135ecd2 2c0e30b6893f6bff927c48952c127c0916a00d88
2024-08-07T18:13:02.3687752Z ++ grep -E '^[+]'
2024-08-07T18:13:02.3688708Z ++ grep -Ev '^(--- a/|\+\+\+ b/)'
2024-08-07T18:13:02.3695684Z error: Could not access 'a374a29cb6805893724c1b0fd023c0335135ecd2'
2024-08-07T18:13:02.3701872Z + diff=
2024-08-07T18:13:02.3706513Z ++ echo -n ''
2024-08-07T18:13:02.3709223Z ++ grep -oP '[^\x00-\x7F]*'
2024-08-07T18:13:02.3721762Z + unicode_diff=
2024-08-07T18:13:02.3722345Z + unicode_grep_exit_code=1
2024-08-07T18:13:02.3722742Z 
2024-08-07T18:13:02.3723027Z + echo ''
2024-08-07T18:13:02.3728335Z ++ echo -n ''
2024-08-07T18:13:02.3729700Z ++ hd
2024-08-07T18:13:02.3742368Z + unicode_diff_hexdump=
2024-08-07T18:13:02.3742719Z 
2024-08-07T18:13:02.3743214Z INFO: No unicode characters found in PR's commits

So it appears to be an issue with the "base" commit.

@maltfield
Copy link
Owner Author

maltfield commented Aug 7, 2024

I don't actually have this problem in my branch; it detects the unicode fine.

$ git diff main | grep -E "^[+]" | grep -Ev '^(--- a/|\+\+\+ b/)'
+# malicious-homoglyphs branch
+ 
+def sayНello():
+sayНello()
+
+
$ 

$ git diff --unified=0 a374a29cb6805893724c1b0fd023c0335135ecd2 2c0e30b6893f6bff927c48952c127c0916a00d8 |  grep -E "^[+]" | grep -Ev '^(--- a/|\+\+\+ b/)'
+# malicious-homoglyphs branch
+    permissions:
+
+    steps:
+def sayНello():
+sayНello()
+
$ 

@maltfield
Copy link
Owner Author

Interesting. I tried to add a couple lines to get some debug info

git branch -a
git log

...but that resulted in an error

2024-08-07T18:36:06.2529380Z + git branch -a
2024-08-07T18:36:06.2542584Z fatal: detected dubious ownership in repository at '/__w/detect-malicious-unicode/detect-malicious-unicode'
2024-08-07T18:36:06.2544708Z To add an exception for this directory, call:
2024-08-07T18:36:06.2545327Z 
2024-08-07T18:36:06.2546194Z 	git config --global --add safe.directory /__w/detect-malicious-unicode/detect-malicious-unicode
2024-08-07T18:36:06.2547000Z + git log
2024-08-07T18:36:06.2557456Z fatal: detected dubious ownership in repository at '/__w/detect-malicious-unicode/detect-malicious-unicode'
2024-08-07T18:36:06.2558707Z To add an exception for this directory, call:
2024-08-07T18:36:06.2559268Z 
2024-08-07T18:36:06.2560177Z 	git config --global --add safe.directory /__w/detect-malicious-unicode/detect-malicious-unicode
2024-08-07T18:36:06.2571160Z ++ git diff --unified=0 a374a29cb6805893724c1b0fd023c0335135ecd2 54b7aeca7a1c2d1babf693c2f1ffe20346667111
2024-08-07T18:36:06.2572431Z ++ grep -E '^[+]'
2024-08-07T18:36:06.2577067Z ++ grep -Ev '^(--- a/|\+\+\+ b/)'
2024-08-07T18:36:06.2580717Z error: Could not access 'a374a29cb6805893724c1b0fd023c0335135ecd2'

When I added the requested line to update the git config, not only did it output the debug info, but it also fixed the git diff error. It's working again

2024-08-07T18:44:50.9807667Z + git config --global --add safe.directory .
2024-08-07T18:44:50.9824142Z + git config --global --add safe.directory /__w/detect-malicious-unicode/detect-malicious-unicode
2024-08-07T18:44:50.9838686Z + git branch -a
2024-08-07T18:44:50.9855712Z * main
2024-08-07T18:44:50.9856496Z   remotes/origin/HEAD -> origin/main
2024-08-07T18:44:50.9857438Z   remotes/origin/main
2024-08-07T18:44:50.9858319Z   remotes/origin/malicious-bidi
2024-08-07T18:44:50.9859173Z   remotes/origin/malicious-homoglyph
2024-08-07T18:44:50.9860766Z + git log
2024-08-07T18:44:50.9876148Z commit f11d477a4d1c5cd55f2be98daa52b6d65bc938a5
2024-08-07T18:44:50.9877574Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9878699Z Date:   Wed Aug 7 13:41:48 2024 -0500
2024-08-07T18:44:50.9879168Z 
2024-08-07T18:44:50.9879376Z     please
2024-08-07T18:44:50.9879797Z 
2024-08-07T18:44:50.9880083Z commit ab3cc2a72ecb78b785de2ac3a91ba81ec9d02a42
2024-08-07T18:44:50.9880972Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9883159Z Date:   Wed Aug 7 13:35:11 2024 -0500
2024-08-07T18:44:50.9883719Z 
2024-08-07T18:44:50.9883924Z     get more info
2024-08-07T18:44:50.9884226Z 
2024-08-07T18:44:50.9884564Z commit 942bc14730c87958abae4b0270ee2d0fbdb68e70
2024-08-07T18:44:50.9889621Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9890642Z Date:   Wed Aug 7 13:11:50 2024 -0500
2024-08-07T18:44:50.9891144Z 
2024-08-07T18:44:50.9892212Z ++ git diff --unified=0 a374a29cb6805893724c1b0fd023c0335135ecd2 f5ce5163c6ece73824b21dd67a8780a4c2d85463
2024-08-07T18:44:50.9893458Z     do I have to change it on the main branch?
2024-08-07T18:44:50.9893946Z 
2024-08-07T18:44:50.9894259Z commit 5f66da60c7f90429237ac598e5c7d3ce5cd6f8a5
2024-08-07T18:44:50.9895713Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9896635Z Date:   Wed Aug 7 13:11:21 2024 -0500
2024-08-07T18:44:50.9897044Z 
2024-08-07T18:44:50.9897270Z     quick save
2024-08-07T18:44:50.9897561Z 
2024-08-07T18:44:50.9897914Z commit b53275e13c968d79429a8873b8ad8fe795cb794b
2024-08-07T18:44:50.9898738Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9899593Z Date:   Wed Aug 7 13:05:49 2024 -0500
2024-08-07T18:44:50.9900030Z 
2024-08-07T18:44:50.9900304Z     fucking yaml
2024-08-07T18:44:50.9900630Z 
2024-08-07T18:44:50.9900888Z commit a374a29cb6805893724c1b0fd023c0335135ecd2
2024-08-07T18:44:50.9901756Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9902730Z Date:   Wed Aug 7 13:00:18 2024 -0500
2024-08-07T18:44:50.9903141Z 
2024-08-07T18:44:50.9903324Z     remove error
2024-08-07T18:44:50.9903660Z 
2024-08-07T18:44:50.9903940Z commit 6e65b9ba357e75656a642b4adb6f787b53b24b2c
2024-08-07T18:44:50.9904928Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9905827Z Date:   Wed Aug 7 12:33:00 2024 -0500
2024-08-07T18:44:50.9906240Z 
2024-08-07T18:44:50.9906605Z     attempting to get it to trigger on subsequent commits
2024-08-07T18:44:50.9910657Z     
2024-08-07T18:44:50.9911566Z      * https://github.com/maltfield/detect-malicious-unicode/pull/2
2024-08-07T18:44:50.9912277Z 
2024-08-07T18:44:50.9912808Z commit 99389e2c82d1ff9dbdb5896a13ba8f3494e9160a
2024-08-07T18:44:50.9914017Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9914997Z Date:   Tue Aug 6 23:37:36 2024 -0500
2024-08-07T18:44:50.9915428Z 
2024-08-07T18:44:50.9915992Z     attempt to add permissions to fix "Resources not accessible by integration" errors
2024-08-07T18:44:50.9917019Z     
2024-08-07T18:44:50.9917751Z      * https://github.com/orgs/community/discussions/35827
2024-08-07T18:44:50.9919157Z      * https://github.com/maltfield/detect-malicious-unicode/issues/3#issuecomment-2272602860
2024-08-07T18:44:50.9919994Z 
2024-08-07T18:44:50.9920187Z commit 4197fab500614d9f34d51c67f910f091b69b663f
2024-08-07T18:44:50.9920852Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9921343Z Date:   Sat Nov 27 19:11:53 2021 +0100
2024-08-07T18:44:50.9921594Z 
2024-08-07T18:44:50.9921734Z     link to buskill implementation
2024-08-07T18:44:50.9922289Z 
2024-08-07T18:44:50.9922592Z commit 3c5a5ec15f51f64c2c83487247887895228424db
2024-08-07T18:44:50.9923495Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9924303Z Date:   Mon Nov 22 23:54:51 2021 +0100
2024-08-07T18:44:50.9924885Z 
2024-08-07T18:44:50.9925330Z     using US spelling of "defense" as it matches the Trojan Code website
2024-08-07T18:44:50.9926011Z 
2024-08-07T18:44:50.9926378Z commit cbac341abf3322209763269199c6dddc13e1cbbd
2024-08-07T18:44:50.9927267Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9928149Z Date:   Mon Nov 22 23:49:47 2021 +0100
2024-08-07T18:44:50.9928623Z 
2024-08-07T18:44:50.9928860Z     attempting to add featured image to readme
2024-08-07T18:44:50.9929221Z 
2024-08-07T18:44:50.9929569Z commit 9647e78451acc7e35cda3fbdb0d4eeded003ca4b
2024-08-07T18:44:50.9930597Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9932342Z Date:   Sun Nov 21 17:53:14 2021 +0100
2024-08-07T18:44:50.9932789Z 
2024-08-07T18:44:50.9933081Z     updated links to example PRs
2024-08-07T18:44:50.9933598Z 
2024-08-07T18:44:50.9933888Z commit 9d038db446f809a04d1558836a6e06d2c2671b9a
2024-08-07T18:44:50.9935047Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9935906Z Date:   Sun Nov 21 17:41:03 2021 +0100
2024-08-07T18:44:50.9936447Z 
2024-08-07T18:44:50.9936819Z     adding non-malicious python scripts
2024-08-07T18:44:50.9937360Z 
2024-08-07T18:44:50.9937639Z commit 64a46100a20cd7f84af30e4b86b231584441d414
2024-08-07T18:44:50.9938519Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9939487Z Date:   Sun Nov 21 17:39:35 2021 +0100
2024-08-07T18:44:50.9939905Z 
2024-08-07T18:44:50.9940424Z     adding workflow to detect unicode in PRs
2024-08-07T18:44:50.9940926Z 
2024-08-07T18:44:50.9941189Z commit ac516cc64584dc462d77554649e9e46096597318
2024-08-07T18:44:50.9942214Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9942980Z Date:   Sun Nov 21 17:37:00 2021 +0100
2024-08-07T18:44:50.9943716Z 
2024-08-07T18:44:50.9943916Z     initial commit
2024-08-07T18:44:50.9944357Z 
2024-08-07T18:44:50.9944678Z commit 9b2178b076af48cd618f85d61f3078efef75d61a
2024-08-07T18:44:50.9945608Z Author: Michael Altfield <[email protected]>
2024-08-07T18:44:50.9946463Z Date:   Sun Nov 21 17:35:53 2021 +0100
2024-08-07T18:44:50.9947052Z 
2024-08-07T18:44:50.9947326Z     Initial commit
2024-08-07T18:44:50.9948148Z ++ grep -Ev '^(--- a/|\+\+\+ b/)'
2024-08-07T18:44:50.9948852Z ++ grep -E '^[+]'
2024-08-07T18:44:50.9949698Z + diff='+# malicious-homoglyphs branch
2024-08-07T18:44:50.9950401Z +    permissions:
2024-08-07T18:44:50.9950712Z +
2024-08-07T18:44:50.9951095Z +    steps:
2024-08-07T18:44:50.9951537Z +        git config --global --add safe.directory .
2024-08-07T18:44:50.9952309Z +        git config --global --add safe.directory /__w/detect-malicious-unicode/detect-malicious-unicode
2024-08-07T18:44:50.9953060Z +        git branch -a
2024-08-07T18:44:50.9953410Z +        git log
2024-08-07T18:44:50.9954451Z +def sayНello():
2024-08-07T18:44:50.9955238Z +sayНello()
2024-08-07T18:44:50.9956032Z +'
2024-08-07T18:44:50.9956593Z ++ echo -n '+# malicious-homoglyphs branch
2024-08-07T18:44:50.9957491Z +    permissions:
2024-08-07T18:44:50.9958038Z +
2024-08-07T18:44:50.9958481Z +    steps:
2024-08-07T18:44:50.9959399Z +        git config --global --add safe.directory .
2024-08-07T18:44:50.9960667Z +        git config --global --add safe.directory /__w/detect-malicious-unicode/detect-malicious-unicode
2024-08-07T18:44:50.9961359Z +        git branch -a
2024-08-07T18:44:50.9961807Z +        git log
2024-08-07T18:44:50.9962201Z +def sayНello():
2024-08-07T18:44:50.9962546Z +sayНello()
2024-08-07T18:44:50.9962924Z +'
2024-08-07T18:44:50.9963221Z ++ grep -oP '[^\x00-\x7F]*'
2024-08-07T18:44:50.9963623Z + unicode_diff='Н
2024-08-07T18:44:50.9964148Z Н'
2024-08-07T18:44:50.9964427Z + unicode_grep_exit_code=0
2024-08-07T18:44:50.9964815Z + echo 'Н
2024-08-07T18:44:50.9965198Z Н'
2024-08-07T18:44:50.9965478Z ++ echo -n 'Н
2024-08-07T18:44:50.9965812Z Н'
2024-08-07T18:44:50.9966163Z ++ hd
2024-08-07T18:44:50.9966422Z Н
2024-08-07T18:44:50.9966873Z Н
2024-08-07T18:44:50.9973930Z + unicode_diff_hexdump='00000000  d0 9d 0a d0 9d                                    |.....|
2024-08-07T18:44:50.9975235Z 00000000  d0 9d 0a d0 9d                                    |.....|
2024-08-07T18:44:50.9976607Z 00000005
2024-08-07T18:44:50.9978661Z ^^ WARNING: Unicode characters found in diff!

@maltfield
Copy link
Owner Author

maltfield commented Aug 7, 2024

I also took this opportunity to add some better error checking:

  1. If the diff command exits non-zero, a WARNING will be commented to the ticket
  2. If the hexdump command exits non-zero, a WARNING will be commented to the ticket
  3. If the word "WARNING" is written as a comment, then the workflow exit 1s, causing BOTH a comment to be written and a "build has failed" error to occur in the PR

Here's a full diff of what I updated in the workflow to fix this bug

maltfield added a commit to BusKill/buskill-app that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant