packsaddle / ruby-git_diff_parser

Parse `git diff` into patches and lines.
http://packsaddle.org
MIT License
33 stars 14 forks source link

diff format for gitlab #8

Open sanemat opened 9 years ago

sanemat commented 9 years ago

:trollface:

$ git diff

diff --git a/README.md b/README.md
index 60cc5e9..54f50e9 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,8 @@
 [![Gem Version](http://img.shields.io/gem/v/saddler.svg?style=flat)](http://badge.fury.io/rb/saddler)
 [![Build Status](http://img.shields.io/travis/packsaddle/ruby-saddler/master.svg?style=flat)](https://travis-ci.org/packsaddle/ruby-saddler)

+**checkstyle2anywhere**
+
 ## Installation

 Add this line to your application's Gemfile:

github: below diff and sha, filename included separated json response. https://developer.github.com/v3/pulls/#list-pull-requests-files

@@ -3,6 +3,8 @@
 [![Gem Version](http://img.shields.io/gem/v/saddler.svg?style=flat)](http://badge.fury.io/rb/saddler)
 [![Build Status](http://img.shields.io/travis/packsaddle/ruby-saddler/master.svg?style=flat)](https://travis-ci.org/packsaddle/ruby-saddler)

+**checkstyle2anywhere**
+
 ## Installation

 Add this line to your application's Gemfile:

gitlab: below diff, but file name isn't included in separated json response, use --- and +++. https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/merge_requests.md#get-single-mr-changes

--- a/README.md
+++ b/README.md
@@ -3,6 +3,8 @@
 [![Gem Version](http://img.shields.io/gem/v/saddler.svg?style=flat)](http://badge.fury.io/rb/saddler)
 [![Build Status](http://img.shields.io/travis/packsaddle/ruby-saddler/master.svg?style=flat)](https://travis-ci.org/packsaddle/ruby-saddler)

+**checkstyle2anywhere**
+
 ## Installation

 Add this line to your application's Gemfile: