Coder Social home page Coder Social logo

grunt-github-changes's Introduction

grunt-github-changes

Grunt plugin to generates changelog using Github Changes

NPM

Getting Started

This plugin requires Grunt.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-github-changes --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-github-changes');

The "githubChanges" task

Overview

In your project's Gruntfile, add a section named githubChanges to the data object passed into grunt.initConfig().

grunt.initConfig({
  githubChanges: {
    dist : {
      options: {
        // Owner and Repository options are mandatory
        owner : 'PunkChameleon',
        repository : 'grunt-github-changes'
      }
    }
})

Options

All options that are valid with github-changes can be used here.

Usage Examples

Using Options in task

The only necessary fields are owner and repository, and the rest are optional. Below is how they can be passed in if desired. For more documentation on each field see the github-changes repo.

grunt.initConfig({
  githubChanges: {
    dist : {
      options: {
        owner : 'PunkChameleon', // MANDATORY
        repository : 'grunt-github-changes', // MANDATORY
        branch : '', // optional string
        tagName : '',// optional string
        auth : false, // optional boolean
        token : '', // optional string
        file : '', // optional string
        dateFormat : '' // optional string
        verbose : false, // optional boolean
        host : '', // optional string
        pathPrefix : '', // optional string
        noMerges : false, // optional boolean
        onlyMerges : false, // optional boolean
        onlyPulls : false, // optional boolean
        useCommitBody : false, // optional boolean
        orderSemver : false // optional boolean
      }
    }
  },
})

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2015 Nick Weingartner. Licensed under the MIT license.

grunt-github-changes's People

Contributors

punkchameleon avatar matiassingers avatar matteofigus avatar

Stargazers

 avatar Lalit Kapoor avatar Ahmad Awais ⌘ avatar Ian Lunn avatar  avatar Paulo Freitas avatar  avatar Alexey Okhrimenko avatar

Watchers

James Cloos avatar  avatar

grunt-github-changes's Issues

Strange directory traversal problem

This concerns calling the actual github-changes module from the task itself (see here: https://github.com/streetlight/grunt-github-changes/blob/master/tasks/github_changes.js#L4).

Originally, I want to traverse a level up, then down into the node modules to call their one file specifically.

Originally, I wanted to do this:

../node_modules/github-changes/bin/index.js

However, I get the following error:

Warning: Command failed: /bin/sh: 1: ../node_modules/github-changes/bin/index.js: not found
Use --force to continue.

So, for now I have a hack on using Node's __dirname variable, but it's not very pretty:

var dirHack = __dirname.replace("/tasks", ""), // Terrible hack, need to fix
       ghC = dirHack + '/node_modules/github-changes/bin/index.js';

This works, but I'd love to avoid it.

Anyone familiar with what could be going on?

No 'targets' found

Have it run in another workflow and get the following error

➜  project git:(changelog) ✗ grunt githubChanges
>> No "githubChanges" targets found.
Warning: Task "githubChanges" failed. Use --force to continue.

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.