ataylorme / eslint-annotate-action

A GitHub action that takes ESLint results from a JSON file and adds them as annotated pull request comments
MIT License
88 stars 32 forks source link

GitHub Enterprise support #69

Open pdziok opened 10 months ago

pdziok commented 10 months ago

I'd like to use this action with GitHub Enterprise but I'm encountering errors. I believe this is related to Octokit configuration as it needs to receive different baseUrl to connect with Github API. The problems I'm getting:

Run ataylorme/eslint-annotate-action@v2
ℹ  info      Starting analysis of the ESLint report eslint_report.json. Standby...
Error: Not Found
✖  fatal     HttpError: Not Found 
    at /opt/actions-runner/_work/_actions/ataylorme/eslint-annotate-action/v2/dist/index.js:7004:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.next (/opt/actions-runner/_work/_actions/ataylorme/eslint-annotate-action/v2/dist/index.js:4938:28)
    at async getPullRequestFiles (/opt/actions-runner/_work/_actions/ataylorme/eslint-annotate-action/v2/dist/index.js:[23](https://github.schibsted.io/payment-checkout-experience/global-logout-lambda/actions/runs/660342/jobs/1139097#step:10:24)211:[25](https://github.schibsted.io/payment-checkout-experience/global-logout-lambda/actions/runs/660342/jobs/1139097#step:10:26))
    at async getPullRequestChangedAnalyzedReport (/opt/actions-runner/_work/_actions/ataylorme/eslint-annotate-action/v2/dist/index.js:23149:[26](https://github.schibsted.io/payment-checkout-experience/global-logout-lambda/actions/runs/660342/jobs/1139097#step:10:27))
    at async /opt/actions-runner/_work/_actions/ataylorme/eslint-annotate-action/v2/dist/index.js:23[27](https://github.schibsted.io/payment-checkout-experience/global-logout-lambda/actions/runs/660342/jobs/1139097#step:10:28)1:11

It looks like a logical place would be to tackle Octokit configuration: https://github.com/ataylorme/eslint-annotate-action/blob/v2/src/constants.ts#L17-L20

ataylorme commented 2 months ago

@pdziok not sure if you are still interested in self-hosted GitHub Enterprise support. If so, 3.0.0 has been released. I welcome pull requests to the v3 branch if you want to tackle this