Coder Social home page Coder Social logo

yhirano55 / lock_diff Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vividmuimui/lock_diff

0.0 1.0 0.0 119 KB

This gem detects changes to your package manager (e.g. Gemfile) and generates a Markdown-formatted diff

License: MIT License

Ruby 99.63% Shell 0.37%

lock_diff's Introduction

LockDiff

Gem Version GitHub tag Build Status Codacy Badge Dependency Status Code Climate Issue Count ghit.me

This gem detects changes to your package manager (e.g. Gemfile) and generates a Markdown-formatted diff including:

  • links to the corresponding package's change logs
  • Github ...-delineated diff links for the relevant changes

It also optionally posts the diff as a comment to the pull request responsible for the package update.

Like this.

vividmuimui/lock_diff_sample#9 (comment) image

Strategies

  • Gemfile.lock(Ruby/Bundler)

Installation

Add this line to your application's Gemfile:

gem 'lock_diff'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lock_diff

Usage

lock_diff requires you to provide a GITHUB_ACCESS_TOKEN as an environment variable.

Command line

$ lock_diff
Usage: lock_diff [options]
Require flags
    -r, --repository=REPOSITORY      Like as "user/repository"
    -n, --number=PULL_REQUEST_NUMBER

Optional flags
        --post-comment=true or false Print result to stdout when false. (default is false)
    -v, --verbose                    Run verbosely
        --version                    Show version

For example, to comment on vividmuimui/lock_diff_sample#9 (comment), run this command:

$ lock_diff -r "vividmuimui/lock_diff_sample" -n 9 --post-comment=false

Ruby

require 'lock_diff'
LockDiff.run(repository: "vividmuimui/lock_diff_sample", number: 9, post_comment: false)

For Tachikoma pull request

When used in conjunction with tachikoma, use the lock_diff_for_tachikoma command instead of lock_diff. lock_diff_for_tachikoma automatically detects and comments on the most recent tachikoma pull request.

Command line

$ lock_diff_for_tachikoma
Usage: lock_diff_for_tachikoma [options]
Require flags
    -r, --repository=REPOSITORY      Like as "user/repository"

Optional flags
        --post-comment=true or false Print result to stdout when false. (default is false)
    -v, --verbose                    Run verbosely
        --version                    Show version
$ lock_diff_for_tachikoma -r "vividmuimui/lock_diff_sample" --post-comment=false

Ruby

require 'lock_diff'
LockDiff.lock_diff_for_tachikoma(repository: "vividmuimui/lock_diff_sample", post_comment: false)

Development

TODO:

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lock_diff. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Original

Most source code in this pepository is by https://github.com/kyanny/compare_linker .

Copyright (c) 2014 Kensuke Nagae

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Code of Conduct

Everyone interacting in the LockDiff project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

lock_diff's People

Contributors

holysugar avatar codacy-badger avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.