You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the openhands-resolver.yml or openhands-resolver-experimental.yml workflows are run on PRs, they encounter an error github.rest[endpoint].createComment is not a function. The workflows should be modified to do the appropriate behavior on PRs.
Run actions/github-script@v7
with:
github-token: ***
script: const issueType = process.env.ISSUE_TYPE;
const endpoint = issueType === 'pr' ? 'pulls' : 'issues';
github.rest[endpoint].createComment({
issue_number: 196,
owner: context.repo.owner,
repo: context.repo.repo,
body: `OpenHands started fixing the ${issueType}! You can monitor the progress [here](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`
});
debug: false
user-agent: actions/github-script
result-encoding: json
retries: 0
retry-exempt-status-codes: 400,401,403,404,4[2](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:2)2
env:
pythonLocation: /opt/hostedtoolcache/Python/[3](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:3).12.7/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.7/x6[4](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:4)/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.7/x64/lib
ISSUE_NUMBER: 196
ISSUE_TYPE: pr
TypeError: github.rest[endpoint].createComment is not a function
at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:3[5](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:5)424:16), <anonymous>:5:23)
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35425:12)
at main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:2[6](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:6))
at /home/runner/work/_actions/actions/github-script/v[7](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:7)/dist/index.js:35497:1
at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35553:3
at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35556:12)
at Module._compile (node:internal/modules/cjs/loader:135[8](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:8):14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:[10](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:10))
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:[12](https://github.com/All-Hands-AI/openhands-resolver/actions/runs/11604865608/job/32314325102?pr=196#step:6:12))
Error: Unhandled error: TypeError: github.rest[endpoint].createComment is not a function
The text was updated successfully, but these errors were encountered:
When the
openhands-resolver.yml
oropenhands-resolver-experimental.yml
workflows are run on PRs, they encounter an errorgithub.rest[endpoint].createComment is not a function
. The workflows should be modified to do the appropriate behavior on PRs.The text was updated successfully, but these errors were encountered: