Skip to content

Conversation

@deviantintegral
Copy link
Contributor

I ran into this over at deviantintegral/pantheon-metrics-prometheus#46. That project vendors dependencies (which is common in golang at least), and making updates to them triggered an error for annotations.

https://github.com/deviantintegral/pantheon-metrics-prometheus/actions/runs/21081006077/job/60634487862

I'm in the process of reviewing and testing this now, I'll mark it as ready when I'm done!

Use paginated pulls.listFiles API instead of pulls.get with diff format,
which has a 300 file limit. Add parsePatch function to handle individual
file patches from the listFiles response.
Comment on lines 11 to 14
export function parsePatch(patch: string | undefined): number[] {
if (!patch) {
return []
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me this is a possible case. I think this may be better without undefined.

@@ -1,5 +1,5 @@
import * as core from '@actions/core'
import * as diff from './diff'
import {parsePatch} from './diff'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should check, because there may be a function we could remove or this should go back to *.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseGitDiff is no longer called except in tests. Should we keep it or remove it?

@deviantintegral
Copy link
Contributor Author

🥳

image

Move undefined check to the caller in getPullRequestDiff where file.patch
may be undefined from the GitHub API response.
@deviantintegral deviantintegral marked this pull request as ready for review January 19, 2026 21:37
@deviantintegral
Copy link
Contributor Author

@ggilder This is ready for review. Thanks for your work on this action, I've used it in several projects over the past few weeks and it's worked nicely!

Copy link
Owner

@ggilder ggilder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you for the contribution!

@ggilder ggilder merged commit b7c9392 into ggilder:main Jan 19, 2026
2 of 3 checks passed
@ggilder
Copy link
Owner

ggilder commented Jan 19, 2026

Just released 👍

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

Successfully merging this pull request may close these issues.

3 participants