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

feat: Ingest PR diffs through .diff url #158

Open
cyclotruc opened this issue Jan 28, 2025 · 2 comments
Open

feat: Ingest PR diffs through .diff url #158

cyclotruc opened this issue Jan 28, 2025 · 2 comments
Assignees
Labels
good first issue Good for newcomers suggestion New feature or request

Comments

@cyclotruc
Copy link
Owner

Image

Stumbled upon this comment in this reddit post: https://www.reddit.com/r/opensource/comments/1htzl4r/pull_request_ingest_turn_any_github_pr_into_a/

Made me think: we could easily add the support for PRs
example:

For
https://github.com/cyclotruc/gitingest/pull/153
We can fetch
https://github.com/cyclotruc/gitingest/pull/153.diff

And return the diff as a digest
I would actually use this feature a lot when reviewing PRs!

Opening this issue in case someone wants to take a stab at it before I do it myself!
feel free to comment if you want to work on this, and reach out to me on discord if you need any help

@cyclotruc cyclotruc added the good first issue Good for newcomers label Jan 28, 2025
@ruancomelli
Copy link

Hey @cyclotruc!

I'd like to give this a try.
This would be my first contribution to this project, and I still don't understand the codebase entirely.

From what it seems, there is no need to change frontend nor CLI code.

Should the return values of

async def ingest(
source: str,
max_file_size: int = 10 * 1024 * 1024, # 10 MB
include_patterns: set[str] | str | None = None,
exclude_patterns: set[str] | str | None = None,
branch: str | None = None,
output: str | None = None,
) -> tuple[str, str, str]:
include only files that were changed in the PR?

Also, you mentioned:

I would actually use this feature a lot when reviewing PRs!

... what would be the desired output here?

@ruancomelli
Copy link

I now have a draft PR open here: #166.
Note that it is still not ready for merge.

@filipchristiansen filipchristiansen changed the title Feat request: Ingest PR diffs through .diff url feat: Ingest PR diffs through .diff url Feb 18, 2025
@filipchristiansen filipchristiansen added the suggestion New feature or request label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers suggestion New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants