GithubHelp home page GithubHelp logo

isabella232 / get-commit-message Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotcms/get-commit-message

0.0 0.0 0.0 79 KB

Whether it's pull request or a push this action will try to get the last commit message

TypeScript 100.00%

get-commit-message's Introduction

Commit Message Getter

A GitHub action that gets that commit messages. The action is able to act on pull request and push events and check the pull request title and body or the commit message of the commits of a push.

On pull requests the title and body are concatenated delimited by two line breaks.

Configuration

See also action definition and the following example workflow.

excludeDescription, excludeTitle and checkAllCommitMessages are optional. Default behavior is to include the description and title and not check pull request commit messages.

Example Workflow

name: 'Commit Message Check'
on:
  pull_request:
    types:
      - opened
      - edited
      - reopened
      - synchronize
  push:
    branches:
      - main
      - 'releases/*'

jobs:
  check-commit-message:
    name: Check Commit Message
    runs-on: ubuntu-latest
    steps:
      - name: Get commit message
        uses: dotCMS/commit-message-getter@v1
        with:
          excludeDescription: 'true' # optional: this excludes the description body of a pull request
          excludeTitle: 'true' # optional: this excludes the title of a pull request
          checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
          accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true

Development

Quick Start

git clone https://github.com/dotCMS/commit-message-getter.git
npm install
npm run build

That's it, just start editing the sources...

Commands

Below is a list of commands you will probably find useful during the development cycle.

npm run build

Builds the package to the lib folder.

npm run format

Runs Prettier on .ts and .tsx files and fixes errors.

npm run format-check

Runs Prettier on .ts and .tsx files without fixing errors.

npm run lint

Runs Eslint on .ts and .tsx files.

npm run pack

Bundles the package to the dist folder.

npm run test

Runs Jest test suites.

npm run all

Runs all of the above commands.

Debugging

More information about debugging Github Actions can be found at https://github.com/actions/toolkit/blob/main/docs/action-debugging.md.

The secrets ACTIONS_STEP_DEBUG and ACTIONS_RUNNER_DEBUG are both set to true in the main repository.

License

This project is released under the terms of the MIT License

get-commit-message's People

Contributors

victoralfaro-dotcms 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.