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

Scale with large monorepos #29

Open
kjellander-unity opened this issue Jun 14, 2023 · 4 comments
Open

Scale with large monorepos #29

kjellander-unity opened this issue Jun 14, 2023 · 4 comments

Comments

@kjellander-unity
Copy link

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?

@tobyhs
Copy link
Contributor

tobyhs commented Jul 4, 2023

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.

@kjellander-unity
Copy link
Author

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?

@tobyhs
Copy link
Contributor

tobyhs commented Jul 12, 2023

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

You can see an example at tobyhs/codemention-test#3 (comment). 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.

@kjellander-unity
Copy link
Author

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

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

No branches or pull requests

2 participants