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

[BUG]: position marked necessary in createReview while it's not #614

Open
1 task done
bnjbvr opened this issue Jan 30, 2023 · 2 comments
Open
1 task done

[BUG]: position marked necessary in createReview while it's not #614

bnjbvr opened this issue Jan 30, 2023 · 2 comments
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@bnjbvr
Copy link

bnjbvr commented Jan 30, 2023

What happened?

In the createReview method, the comment's position is marked as necessary according to TypeScript's typings, but the documentation states it's not: https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#create-a-review-for-a-pull-request

Versions

  "dependencies": {
    "@actions/core": "^1.2.6",
    "@actions/exec": "^1.0.4",
    "@actions/github": "^4.0.0"
  },
  "devDependencies": {
    "@types/jest": "^26.0.10",
    "@types/node": "^14.6.1",
    "@typescript-eslint/eslint-plugin": "^3.10.1",
    "@typescript-eslint/parser": "^3.10.1",
    "@vercel/ncc": "^0.24.0",
    "eslint": "^7.7.0",
    "eslint-config-sentry": "^1.43.0",
    "eslint-plugin-jest": "^23.20.0",
    "eslint-plugin-prettier": "^3.1.4",
    "husky": "^4.2.5",
    "jest": "^26.4.2",
    "jest-circus": "^26.4.2",
    "js-yaml": "^3.13.1",
    "lint-staged": "^10.2.13",
    "prettier": "^2.1.1",
    "ts-jest": "^26.3.0",
    "typescript": "^4.0.2"
  }

node is v19.5

Relevant log output

src/createReviewCommentsFromPatch.ts:74:7 - error TS2322: Type '{ path: string; body: string; side: string; start_side: string; start_line: number | undefined; line: number; }[]' is not assignable to type 'PullsCreateReviewParamsComments[]'.
  Property 'position' is missing in type '{ path: string; body: string; side: string; start_side: string; start_line: number | undefined; line: number; }' but required in type 'PullsCreateReviewParamsComments'.

74       comments,
         ~~~~~~~~

  node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts:39740:5
    39740     position: number;
              ~~~~~~~~
    'position' is declared here.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bnjbvr bnjbvr added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jan 30, 2023
@kfcampbell kfcampbell added Priority: Normal Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jan 30, 2023
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Jan 30, 2023
@wolfy1339
Copy link
Member

The types are auto-generated, the issue doesn't lie within this repo.

To get this fixed, file an issue at this repo: https://github.com/github/rest-api-description/ and link back to it here

@nickfloyd nickfloyd added the hacktoberfest Issues for participation in Hacktoberfest label Sep 20, 2023
@wolfy1339
Copy link
Member

Hi, is this still an issue with the latest versions of the Octokit libs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

4 participants