codenotify icon indicating copy to clipboard operation
codenotify copied to clipboard

Scale with large monorepos

Open kjellander-unity opened this issue 2 years ago • 4 comments

I'm trying to use the action on a large monorepo and unfortunately it's spending 5 minutes processing the git fetch command here. From local testing on command line it seems like just adding additional arguments for origin and the ref makes is blazing fast. That doesn't work in practice though, since usually the PR branch is deleted after merge.

I figure the only way to solve this at scale is to rewrite the action to query the GitHub API for "what changed in the PR?" instead of relying on a local clone?

kjellander-unity avatar Jun 14 '23 09:06 kjellander-unity

I had similar issues when using codenotify with a large repo, so I created my own GitHub action at https://github.com/tobyhs/codemention that uses GitHub's REST API to fetch a pull request's diff instead of using actions/checkout to clone the repo.

tobyhs avatar Jul 04 '23 06:07 tobyhs

Thank you @tobyhs - that certainly looks very useful! I'll give it a try after my vacation.

Do you have any example of how the comment posted looks like? Similar to Codenotify?

kjellander-unity avatar Jul 11 '23 06:07 kjellander-unity

Do you have any example of how the comment posted looks like? Similar to Codenotify?

You can see an example at https://github.com/tobyhs/codemention-test/pull/3#issuecomment-1627779765. Currently, it isn't as detailed as Codenotify (it doesn't have the commits used to obtain the diff; it only lists the matching file patterns instead of the files themselves) as I initially wanted to get something minimally viable going.

tobyhs avatar Jul 12 '23 05:07 tobyhs

Nice, that's good enough for me. Thanks for the tip!

kjellander-unity avatar Jul 12 '23 20:07 kjellander-unity