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: Git Diff should return the diff between two commits #27

Open
nelsonic opened this issue May 11, 2022 · 1 comment
Open

Feat: Git Diff should return the diff between two commits #27

nelsonic opened this issue May 11, 2022 · 1 comment

Comments

@nelsonic
Copy link
Member

This is a significantly more advanced feature than what we have already built
and it's one of the reasons we wanted to have this package separate from the App that uses it;
it needs to be extensively independently tested.

We will need to map this out carefully before diving in.

  1. Diff a specific file or return a list of all the files with the diff nested?
  2. Diff the current branch against the main (or master) branch?
  3. Run the diff on localhost as there is no REST API endpoint for this.
  4. Parse the result and return as plaintext so that we can visualise it
@nelsonic
Copy link
Member Author

Re-reading the Gitea API docs, it appears that a git diff of a PR is possible:
https://try.gitea.io/api/swagger#/repository/repoDownloadPullDiffOrPatch
image

i.e. if code is on a branch and we create a PR for it (which we would in order to merge it in),
then we can get the diff directly out of Git.

Not saying this would "solve" our problem ... it might not have everything we need.
But the fact that it exists means we have a starting point.
I think this alone is enough of a reason for me to consider switching from Gogs to Gitea: dwyl/github-backup#136 (comment)

@SimonLab in the context of getting "diff" working in the App we're building (so that it's available in the editor ...)
What are your thoughts on shifting the work we've done gogs > gitea? 💭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Nelson's List
  
More ToDo ThanCanEver Be Done
Development

No branches or pull requests

1 participant