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 request: Ingest PR diffs through .diff url #158

Open
cyclotruc opened this issue Jan 28, 2025 · 2 comments · May be fixed by #166
Open

Feat request: Ingest PR diffs through .diff url #158

cyclotruc opened this issue Jan 28, 2025 · 2 comments · May be fixed by #166
Assignees
Labels
good first issue Good for newcomers

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 ruancomelli linked a pull request Feb 5, 2025 that will close this issue
2 tasks
@ruancomelli
Copy link

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

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants