Chris Edstrom
b906cd6381
Add inline diff in repos/pulls/files api
Add the inline diff on a per file basis to be compatible with GitHub
Example:
```
curl http://localhost:3000/api/v1/repos/cedstrom/test/pulls/1/files?token=[redacted]
```
```
[
{
"filename": ".gitignore",
"status": "added",
"additions": 2,
"deletions": 0,
"changes": 2,
"html_url": "ce2c532233/.gitignore",
"contents_url": "http://localhost:3000/api/v1/repos/cedstrom/test/contents/.gitignore?ref=ce2c53223388eaaa026c25156b807e30acc05a56",
"raw_url": "ce2c532233/.gitignore",
"patch": "diff --git a/.gitignore b/.gitignore\n--- a/.gitignore\n+++ b/.gitignore\n@@ -0,1 +1,2 @@\n @@ -0,0 +1,2 @@\n++.env\n++.env.local\n\n"
},
{
"filename": "README.md",
"status": "changed",
"additions": 1,
"deletions": 0,
"changes": 1,
"html_url": "ce2c532233/README.md",
"contents_url": "http://localhost:3000/api/v1/repos/cedstrom/test/contents/README.md?ref=ce2c53223388eaaa026c25156b807e30acc05a56",
"raw_url": "ce2c532233/README.md",
"patch": "diff --git a/README.md b/README.md\n--- a/README.md\n+++ b/README.md\n@@ -1,2 +1,3 @@\n @@ -1,2 +1,3 @@\n # test\n \n++This is my first PR.\n\n"
}
]
```
2025-10-10 18:10:04 +00:00
..
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-24 09:45:38 -07:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2024-08-12 16:00:40 +08:00
2025-09-06 16:52:41 +00:00
2025-09-16 04:32:03 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-10-10 18:10:04 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2024-04-16 11:45:04 +08:00
2025-10-06 21:23:14 -07:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-13 10:34:43 -04:00
2025-03-17 19:24:54 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-06 16:52:41 +00:00
2025-09-13 10:34:43 -04:00
2025-03-17 19:24:54 +00:00