-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement basic summarize logic #2
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"type":"GitDiff","files":[{"type":"ChangedFile","chunks":[{"type":"Chunk","toFileRange":{"start":22,"lines":7},"fromFileRange":{"start":22,"lines":6},"changes":[{"type":"UnchangedLine","lineBefore":22,"lineAfter":22,"content":" },"},{"type":"UnchangedLine","lineBefore":23,"lineAfter":23,"content":" \"devDependencies\": {"},{"type":"UnchangedLine","lineBefore":24,"lineAfter":24,"content":" \"@cloudflare/workers-types\": \"^4.20240208.0\","},{"type":"AddedLine","lineAfter":25,"content":" \"@octokit/webhooks-types\": \"^7.3.2\","},{"type":"UnchangedLine","lineBefore":25,"lineAfter":26,"content":" \"eslint\": \"^8.56.0\","},{"type":"UnchangedLine","lineBefore":26,"lineAfter":27,"content":" \"eslint-config-prettier\": \"^9.1.0\","},{"type":"UnchangedLine","lineBefore":27,"lineAfter":28,"content":" \"eslint-plugin-unicorn\": \"^51.0.1\","}]},{"type":"Chunk","toFileRange":{"start":36,"lines":8},"fromFileRange":{"start":35,"lines":6},"changes":[{"type":"UnchangedLine","lineBefore":35,"lineAfter":36,"content":" },"},{"type":"UnchangedLine","lineBefore":36,"lineAfter":37,"content":" \"dependencies\": {"},{"type":"UnchangedLine","lineBefore":37,"lineAfter":38,"content":" \"@octokit/auth-app\": \"^6.0.3\","},{"type":"DeletedLine","lineBefore":38,"content":" \"octokit\": \"^3.1.2\""},{"type":"AddedLine","lineAfter":39,"content":" \"octokit\": \"^3.1.2\","},{"type":"AddedLine","lineAfter":40,"content":" \"parse-git-diff\": \"^0.0.15\","},{"type":"AddedLine","lineAfter":41,"content":" \"zod\": \"^3.22.4\""},{"type":"UnchangedLine","lineBefore":39,"lineAfter":42,"content":" }"},{"type":"UnchangedLine","lineBefore":40,"lineAfter":43,"content":"}"}]}],"path":"package.json"},{"type":"ChangedFile","chunks":[{"context":"dependencies:","type":"Chunk","toFileRange":{"start":11,"lines":20},"fromFileRange":{"start":11,"lines":11},"changes":[{"type":"UnchangedLine","lineBefore":11,"lineAfter":11,"content":" octokit:"},{"type":"UnchangedLine","lineBefore":12,"lineAfter":12,"content":" specifier: ^3.1.2"},{"type":"UnchangedLine","lineBefore":13,"lineAfter":13,"content":" version: 3.1.2"},{"type":"AddedLine","lineAfter":14,"content":" parse-git-diff:"},{"type":"AddedLine","lineAfter":15,"content":" specifier: ^0.0.15"},{"type":"AddedLine","lineAfter":16,"content":" version: 0.0.15"},{"type":"AddedLine","lineAfter":17,"content":" zod:"},{"type":"AddedLine","lineAfter":18,"content":" specifier: ^3.22.4"},{"type":"AddedLine","lineAfter":19,"content":" version: 3.22.4"},{"type":"UnchangedLine","lineBefore":14,"lineAfter":20,"content":""},{"type":"UnchangedLine","lineBefore":15,"lineAfter":21,"content":"devDependencies:"},{"type":"UnchangedLine","lineBefore":16,"lineAfter":22,"content":" \"@cloudflare/workers-types\":"},{"type":"UnchangedLine","lineBefore":17,"lineAfter":23,"content":" specifier: ^4.20240208.0"},{"type":"UnchangedLine","lineBefore":18,"lineAfter":24,"content":" version: 4.20240208.0"},{"type":"AddedLine","lineAfter":25,"content":" \"@octokit/webhooks-types\":"},{"type":"AddedLine","lineAfter":26,"content":" specifier: ^7.3.2"},{"type":"AddedLine","lineAfter":27,"content":" version: 7.3.2"},{"type":"UnchangedLine","lineBefore":19,"lineAfter":28,"content":" eslint:"},{"type":"UnchangedLine","lineBefore":20,"lineAfter":29,"content":" specifier: ^8.56.0"},{"type":"UnchangedLine","lineBefore":21,"lineAfter":30,"content":" version: 8.56.0"}]},{"context":"packages:","type":"Chunk","toFileRange":{"start":907,"lines":6},"fromFileRange":{"start":898,"lines":7},"changes":[{"type":"UnchangedLine","lineBefore":898,"lineAfter":907,"content":" {"},{"type":"UnchangedLine","lineBefore":899,"lineAfter":908,"content":" integrity: sha512-JWOoOgtWTFnTSAamPXXyjTY5/apttvNxF+vPBnwdSu5cj5snrd7FO0fyw4+wTXy8fHduq626JjhO+TwCyyA6vA==,"},{"type":"UnchangedLine","lineBefore":900,"lineAfter":909,"content":" }"},{"type":"DeletedLine","lineBefore":901,"content":" dev: false"},{"type":"UnchangedLine","lineBefore":902,"lineAfter":910,"content":""},{"type":"UnchangedLine","lineBefore":903,"lineAfter":911,"content":" /@octokit/webhooks@12.1.1:"},{"type":"UnchangedLine","lineBefore":904,"lineAfter":912,"content":" resolution:"}]},{"context":"packages:","type":"Chunk","toFileRange":{"start":2966,"lines":13},"fromFileRange":{"start":2958,"lines":6},"changes":[{"type":"UnchangedLine","lineBefore":2958,"lineAfter":2966,"content":" callsites: 3.1.0"},{"type":"UnchangedLine","lineBefore":2959,"lineAfter":2967,"content":" dev: true"},{"type":"UnchangedLine","lineBefore":2960,"lineAfter":2968,"content":""},{"type":"AddedLine","lineAfter":2969,"content":" /parse-git-diff@0.0.15:"},{"type":"AddedLine","lineAfter":2970,"content":" resolution:"},{"type":"AddedLine","lineAfter":2971,"content":" {"},{"type":"AddedLine","lineAfter":2972,"content":" integrity: sha512-KU7FMvw7ybx2BqkSJthyLl6G4LmKzWwOyalNLdJtzkV7xIFU5oCIVDP9OQl+0vkVv7EKiKDnJlkdzPQ6ueFsgw==,"},{"type":"AddedLine","lineAfter":2973,"content":" }"},{"type":"AddedLine","lineAfter":2974,"content":" dev: false"},{"type":"AddedLine","lineAfter":2975,"content":""},{"type":"UnchangedLine","lineBefore":2961,"lineAfter":2976,"content":" /parse-json@5.2.0:"},{"type":"UnchangedLine","lineBefore":2962,"lineAfter":2977,"content":" resolution:"},{"type":"UnchangedLine","lineBefore":2963,"lineAfter":2978,"content":" {"}]},{"context":"packages:","type":"Chunk","toFileRange":{"start":3846,"lines":3},"fromFileRange":{"start":3831,"lines":4},"changes":[{"type":"UnchangedLine","lineBefore":3831,"lineAfter":3846,"content":" {"},{"type":"UnchangedLine","lineBefore":3832,"lineAfter":3847,"content":" integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==,"},{"type":"UnchangedLine","lineBefore":3833,"lineAfter":3848,"content":" }"},{"type":"DeletedLine","lineBefore":3834,"content":" dev: true"}]}],"path":"pnpm-lock.yaml"},{"type":"AddedFile","chunks":[{"type":"Chunk","toFileRange":{"start":1,"lines":8},"fromFileRange":{"start":0,"lines":0},"changes":[{"type":"AddedLine","lineAfter":1,"content":"import parseGitDiff from \"parse-git-diff\";"},{"type":"AddedLine","lineAfter":2,"content":""},{"type":"AddedLine","lineAfter":3,"content":"export function genDiffSummary(diffFile: string) {"},{"type":"AddedLine","lineAfter":4,"content":" const diff = parseGitDiff(diffFile);"},{"type":"AddedLine","lineAfter":5,"content":""},{"type":"AddedLine","lineAfter":6,"content":" // TODO: Implement diff summary and return label as well"},{"type":"AddedLine","lineAfter":7,"content":" return \"```json\\n\" + JSON.stringify(diff) + \"\\n```\";"},{"type":"AddedLine","lineAfter":8,"content":"}"}]}],"path":"src/diff.ts"},{"type":"ChangedFile","chunks":[{"context":"router.post(\"/github/webhook\", async (req, env) => {","type":"Chunk","toFileRange":{"start":13,"lines":7},"fromFileRange":{"start":13,"lines":7},"changes":[{"type":"UnchangedLine","lineBefore":13,"lineAfter":13,"content":" const octoApp = useOctoApp(env);"},{"type":"UnchangedLine","lineBefore":14,"lineAfter":14,"content":""},{"type":"UnchangedLine","lineBefore":15,"lineAfter":15,"content":" await octoApp.webhooks.verifyAndReceive({"},{"type":"DeletedLine","lineBefore":16,"content":" id: unwrap(req.headers.get(\"x-request-id\")),"},{"type":"AddedLine","lineAfter":16,"content":" id: unwrap(req.headers.get(\"x-github-hook-id\")),"},{"type":"UnchangedLine","lineBefore":17,"lineAfter":17,"content":" name: unwrap(req.headers.get(\"x-github-event\")) as any,"},{"type":"UnchangedLine","lineBefore":18,"lineAfter":18,"content":" signature: unwrap(req.headers.get(\"x-hub-signature\")),"},{"type":"UnchangedLine","lineBefore":19,"lineAfter":19,"content":" payload: await req.text(),"}]}],"path":"src/index.ts"},{"type":"ChangedFile","chunks":[{"type":"Chunk","toFileRange":{"start":1,"lines":107},"fromFileRange":{"start":1,"lines":4},"changes":[{"type":"DeletedLine","lineBefore":1,"content":"import { App } from \"octokit\";"},{"type":"AddedLine","lineAfter":1,"content":"import { App, type Octokit } from \"octokit\";"},{"type":"AddedLine","lineAfter":2,"content":"import type { PullRequest } from \"@octokit/webhooks-types\";"},{"type":"AddedLine","lineAfter":3,"content":"import { genDiffSummary } from \"./diff\";"},{"type":"AddedLine","lineAfter":4,"content":"import { unwrap } from \"./utils\";"},{"type":"AddedLine","lineAfter":5,"content":"import { z } from \"zod\";"},{"type":"AddedLine","lineAfter":6,"content":""},{"type":"AddedLine","lineAfter":7,"content":"const ViewerSchema = z.object({"},{"type":"AddedLine","lineAfter":8,"content":" viewer: z.object({"},{"type":"AddedLine","lineAfter":9,"content":" databaseId: z.number(),"},{"type":"AddedLine","lineAfter":10,"content":" }),"},{"type":"AddedLine","lineAfter":11,"content":"});"},{"type":"AddedLine","lineAfter":12,"content":""},{"type":"AddedLine","lineAfter":13,"content":"/**"},{"type":"AddedLine","lineAfter":14,"content":" * Find PR comment number to edit, if we have already left a comment there."},{"type":"AddedLine","lineAfter":15,"content":" *"},{"type":"AddedLine","lineAfter":16,"content":" * If this is a new PR we haven't touched before, this will return `null`,"},{"type":"AddedLine","lineAfter":17,"content":" * suggesting we should create a new comment."},{"type":"AddedLine","lineAfter":18,"content":" */"},{"type":"AddedLine","lineAfter":19,"content":"async function findPRComment(octo: Octokit, pr: PullRequest) {"},{"type":"AddedLine","lineAfter":20,"content":" // IDK how to get the app's user ID with rest API. But this is trivial with"},{"type":"AddedLine","lineAfter":21,"content":" // graphQL"},{"type":"AddedLine","lineAfter":22,"content":" const viewerQuery = await octo.graphql(`query { viewer { databaseId } }`);"},{"type":"AddedLine","lineAfter":23,"content":" const viewer = ViewerSchema.parse(viewerQuery);"},{"type":"AddedLine","lineAfter":24,"content":""},{"type":"AddedLine","lineAfter":25,"content":" // Only listing the first page for pr comments. This endpoint sorts comments"},{"type":"AddedLine","lineAfter":26,"content":" // in ascending order of comment number (which means commenting order/creation"},{"type":"AddedLine","lineAfter":27,"content":" // time). Assuming we are fast and be the first few bots leaving comments in"},{"type":"AddedLine","lineAfter":28,"content":" // the PR."},{"type":"AddedLine","lineAfter":29,"content":" const comments = await octo.request("},{"type":"AddedLine","lineAfter":30,"content":" \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\","},{"type":"AddedLine","lineAfter":31,"content":" {"},{"type":"AddedLine","lineAfter":32,"content":" owner: pr.base.repo.owner.login,"},{"type":"AddedLine","lineAfter":33,"content":" repo: pr.base.repo.name,"},{"type":"AddedLine","lineAfter":34,"content":" issue_number: pr.number,"},{"type":"AddedLine","lineAfter":35,"content":" },"},{"type":"AddedLine","lineAfter":36,"content":" );"},{"type":"AddedLine","lineAfter":37,"content":""},{"type":"AddedLine","lineAfter":38,"content":" for (const comment of comments.data) {"},{"type":"AddedLine","lineAfter":39,"content":" if (comment.user?.id === viewer.viewer.databaseId) {"},{"type":"AddedLine","lineAfter":40,"content":" return comment.id;"},{"type":"AddedLine","lineAfter":41,"content":" }"},{"type":"AddedLine","lineAfter":42,"content":" }"},{"type":"AddedLine","lineAfter":43,"content":""},{"type":"AddedLine","lineAfter":44,"content":" return null;"},{"type":"AddedLine","lineAfter":45,"content":"}"},{"type":"AddedLine","lineAfter":46,"content":""},{"type":"AddedLine","lineAfter":47,"content":"async function handle(app: App, installation_id: number, pr: PullRequest) {"},{"type":"AddedLine","lineAfter":48,"content":" console.log("},{"type":"AddedLine","lineAfter":49,"content":" `Handling PR ${pr.base.repo.full_name}#${pr.number}. Installation ID = ${installation_id}`,"},{"type":"AddedLine","lineAfter":50,"content":" );"},{"type":"AddedLine","lineAfter":51,"content":""},{"type":"AddedLine","lineAfter":52,"content":" const octo = await app.getInstallationOctokit(installation_id);"},{"type":"AddedLine","lineAfter":53,"content":""},{"type":"AddedLine","lineAfter":54,"content":" if (pr.state === \"closed\") {"},{"type":"AddedLine","lineAfter":55,"content":" console.info(\"PR is closed. Ignoring the webhook\");"},{"type":"AddedLine","lineAfter":56,"content":" return;"},{"type":"AddedLine","lineAfter":57,"content":" }"},{"type":"AddedLine","lineAfter":58,"content":""},{"type":"AddedLine","lineAfter":59,"content":" console.log(\"Fetching diff for the PR\");"},{"type":"AddedLine","lineAfter":60,"content":" const response = await octo.request("},{"type":"AddedLine","lineAfter":61,"content":" \"GET /repos/{owner}/{repo}/pulls/{pull_number}\","},{"type":"AddedLine","lineAfter":62,"content":" {"},{"type":"AddedLine","lineAfter":63,"content":" owner: pr.base.repo.owner.login,"},{"type":"AddedLine","lineAfter":64,"content":" repo: pr.base.repo.name,"},{"type":"AddedLine","lineAfter":65,"content":" pull_number: pr.number,"},{"type":"AddedLine","lineAfter":66,"content":" mediaType: {"},{"type":"AddedLine","lineAfter":67,"content":" format: \"diff\","},{"type":"AddedLine","lineAfter":68,"content":" },"},{"type":"AddedLine","lineAfter":69,"content":" },"},{"type":"AddedLine","lineAfter":70,"content":" );"},{"type":"AddedLine","lineAfter":71,"content":" // The cast is suggested here. Cast is necessary coz octokit does not support"},{"type":"AddedLine","lineAfter":72,"content":" // mediaType in typing."},{"type":"AddedLine","lineAfter":73,"content":" // https://github.com/octokit/request.js/issues/463#issuecomment-1164800888"},{"type":"AddedLine","lineAfter":74,"content":" const diffFile = response.data as unknown as string;"},{"type":"AddedLine","lineAfter":75,"content":""},{"type":"AddedLine","lineAfter":76,"content":" const summary = genDiffSummary(diffFile);"},{"type":"AddedLine","lineAfter":77,"content":""},{"type":"AddedLine","lineAfter":78,"content":" console.log(\"Finding existing PR comment\");"},{"type":"AddedLine","lineAfter":79,"content":" const commentID = await findPRComment(octo, pr);"},{"type":"AddedLine","lineAfter":80,"content":""},{"type":"AddedLine","lineAfter":81,"content":" if (commentID == null) {"},{"type":"AddedLine","lineAfter":82,"content":" console.info(\"Cannot find existing PR. Leaving new comment\");"},{"type":"AddedLine","lineAfter":83,"content":" await octo.request("},{"type":"AddedLine","lineAfter":84,"content":" \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\","},{"type":"AddedLine","lineAfter":85,"content":" {"},{"type":"AddedLine","lineAfter":86,"content":" owner: pr.base.repo.owner.login,"},{"type":"AddedLine","lineAfter":87,"content":" repo: pr.base.repo.name,"},{"type":"AddedLine","lineAfter":88,"content":" issue_number: pr.number,"},{"type":"AddedLine","lineAfter":89,"content":" body: summary,"},{"type":"AddedLine","lineAfter":90,"content":" },"},{"type":"AddedLine","lineAfter":91,"content":" );"},{"type":"AddedLine","lineAfter":92,"content":" } else {"},{"type":"AddedLine","lineAfter":93,"content":" console.info(`Updating PR comment ${commentID}`);"},{"type":"AddedLine","lineAfter":94,"content":" await octo.request("},{"type":"AddedLine","lineAfter":95,"content":" \"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\","},{"type":"AddedLine","lineAfter":96,"content":" {"},{"type":"AddedLine","lineAfter":97,"content":" owner: pr.base.repo.owner.login,"},{"type":"AddedLine","lineAfter":98,"content":" repo: pr.base.repo.name,"},{"type":"AddedLine","lineAfter":99,"content":" comment_id: commentID,"},{"type":"AddedLine","lineAfter":100,"content":" body: summary,"},{"type":"AddedLine","lineAfter":101,"content":" },"},{"type":"AddedLine","lineAfter":102,"content":" );"},{"type":"AddedLine","lineAfter":103,"content":" }"},{"type":"AddedLine","lineAfter":104,"content":"}"},{"type":"UnchangedLine","lineBefore":2,"lineAfter":105,"content":""},{"type":"UnchangedLine","lineBefore":3,"lineAfter":106,"content":"export function useOctoApp(env: Env) {"},{"type":"UnchangedLine","lineBefore":4,"lineAfter":107,"content":" const app = new App({"}]},{"context":"export function useOctoApp(env: Env) {","type":"Chunk","toFileRange":{"start":110,"lines":46},"fromFileRange":{"start":7,"lines":5},"changes":[{"type":"UnchangedLine","lineBefore":7,"lineAfter":110,"content":" webhooks: { secret: env.GH_WEBHOOK_SECRET },"},{"type":"UnchangedLine","lineBefore":8,"lineAfter":111,"content":" });"},{"type":"UnchangedLine","lineBefore":9,"lineAfter":112,"content":""},{"type":"AddedLine","lineAfter":113,"content":" app.webhooks.on(\"pull_request.edited\", (event) =>"},{"type":"AddedLine","lineAfter":114,"content":" handle("},{"type":"AddedLine","lineAfter":115,"content":" app,"},{"type":"AddedLine","lineAfter":116,"content":" unwrap("},{"type":"AddedLine","lineAfter":117,"content":" event.payload.installation?.id,"},{"type":"AddedLine","lineAfter":118,"content":" \"Missing installation.id in webhook payload\","},{"type":"AddedLine","lineAfter":119,"content":" ),"},{"type":"AddedLine","lineAfter":120,"content":" event.payload.pull_request,"},{"type":"AddedLine","lineAfter":121,"content":" ),"},{"type":"AddedLine","lineAfter":122,"content":" );"},{"type":"AddedLine","lineAfter":123,"content":" app.webhooks.on(\"pull_request.synchronize\", (event) =>"},{"type":"AddedLine","lineAfter":124,"content":" handle("},{"type":"AddedLine","lineAfter":125,"content":" app,"},{"type":"AddedLine","lineAfter":126,"content":" unwrap("},{"type":"AddedLine","lineAfter":127,"content":" event.payload.installation?.id,"},{"type":"AddedLine","lineAfter":128,"content":" \"Missing installation.id in webhook payload\","},{"type":"AddedLine","lineAfter":129,"content":" ),"},{"type":"AddedLine","lineAfter":130,"content":" event.payload.pull_request,"},{"type":"AddedLine","lineAfter":131,"content":" ),"},{"type":"AddedLine","lineAfter":132,"content":" );"},{"type":"AddedLine","lineAfter":133,"content":" app.webhooks.on(\"pull_request.opened\", (event) =>"},{"type":"AddedLine","lineAfter":134,"content":" handle("},{"type":"AddedLine","lineAfter":135,"content":" app,"},{"type":"AddedLine","lineAfter":136,"content":" unwrap("},{"type":"AddedLine","lineAfter":137,"content":" event.payload.installation?.id,"},{"type":"AddedLine","lineAfter":138,"content":" \"Missing installation.id in webhook payload\","},{"type":"AddedLine","lineAfter":139,"content":" ),"},{"type":"AddedLine","lineAfter":140,"content":" event.payload.pull_request,"},{"type":"AddedLine","lineAfter":141,"content":" ),"},{"type":"AddedLine","lineAfter":142,"content":" );"},{"type":"AddedLine","lineAfter":143,"content":" app.webhooks.on(\"pull_request.reopened\", (event) =>"},{"type":"AddedLine","lineAfter":144,"content":" handle("},{"type":"AddedLine","lineAfter":145,"content":" app,"},{"type":"AddedLine","lineAfter":146,"content":" unwrap("},{"type":"AddedLine","lineAfter":147,"content":" event.payload.installation?.id,"},{"type":"AddedLine","lineAfter":148,"content":" \"Missing installation.id in webhook payload\","},{"type":"AddedLine","lineAfter":149,"content":" ),"},{"type":"AddedLine","lineAfter":150,"content":" event.payload.pull_request,"},{"type":"AddedLine","lineAfter":151,"content":" ),"},{"type":"AddedLine","lineAfter":152,"content":" );"},{"type":"AddedLine","lineAfter":153,"content":""},{"type":"UnchangedLine","lineBefore":10,"lineAfter":154,"content":" return app;"},{"type":"UnchangedLine","lineBefore":11,"lineAfter":155,"content":"}"}]}],"path":"src/octo.ts"},{"type":"ChangedFile","chunks":[{"type":"Chunk","toFileRange":{"start":1,"lines":9},"fromFileRange":{"start":1,"lines":6},"changes":[{"type":"DeletedLine","lineBefore":1,"content":"export function unwrap<T>(value: T): NonNullable<T> {"},{"type":"AddedLine","lineAfter":1,"content":"export function unwrap<T>("},{"type":"AddedLine","lineAfter":2,"content":" value: T,"},{"type":"AddedLine","lineAfter":3,"content":" message: string = \"Tried to unwrap a nullish value\","},{"type":"AddedLine","lineAfter":4,"content":"): NonNullable<T> {"},{"type":"UnchangedLine","lineBefore":2,"lineAfter":5,"content":" if (value == null) {"},{"type":"DeletedLine","lineBefore":3,"content":" throw new Error(\"Tried to unwrap a nullish value\");"},{"type":"AddedLine","lineAfter":6,"content":" throw new Error(message);"},{"type":"UnchangedLine","lineBefore":4,"lineAfter":7,"content":" }"},{"type":"UnchangedLine","lineBefore":5,"lineAfter":8,"content":""},{"type":"UnchangedLine","lineBefore":6,"lineAfter":9,"content":" return value;"}]}],"path":"src/utils.ts"}]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.