Git Product home page Git Product logo

generate-pull-request-description's Introduction

Release codecov pre-commit black

Pull request description generator

A GitHub action that generates pull request descriptions from Conventional Commit messages on a branch. These descriptions can be used with other GitHub actions to automate release notes.

Features summary

  • Automatic breaking change highlighting and upgrade instructions
  • Automatic categorisation of all commit messages in the pull request branch
  • Choosing which part of the description to generate, enabling descriptions containing a generated section alongside static/user-written sections
  • Easy skipping of description updating when you're ready to fine-tune and edit the description

Usage

Add the action to pull request workflows alongside the riskledger/update-pr-description action to dynamically update the description each time you push:

steps:
- uses: actions/checkout@v3

- uses: octue/[email protected]
  id: pr-description
  with:
    pull_request_url: ${{ github.event.pull_request.url }}
    api_token: ${{ secrets.GITHUB_TOKEN }}

- name: Update pull request body
  uses: riskledger/update-pr-description@v2
  with:
    body: ${{ steps.pr-description.outputs.pull_request_description }}
    token: ${{ secrets.GITHUB_TOKEN }}

Features

Breaking change highlighting

If breaking changes are indicated in any of the commit messages' bodies via BREAKING CHANGE: or BREAKING-CHANGE:, these commits are marked and a warning is added to the top of the release notes. Any other text in these sections is treated as upgrade instructions and added to the end of the pull request description.

Choosing which section of the description to update

The only part of the pull request description that is updated by the action is the section bounded by:

  • <!--- START AUTOGENERATED NOTES --->
  • <!--- END AUTOGENERATED NOTES --->

This section will always be replaced with a summary of all the commit messages in the pull request so far. The markers (invisible in rendered markdown) are added in automatically when the action first runs, but you can move them manually. Any text you add outside of these will remain untouched so you can add, for example, your own static summary of the pull request while having a dynamic summary of the commits.

Skipping description updates

Updating the description is skipped if the <!--- SKIP AUTOGENERATED NOTES ---> marker is present anywhere in the pull request description. This allows commits to be documented in the description until you're ready to fine-tune or cherry-pick commit descriptions when your pull request is ready for review.

generate-pull-request-description's People

Contributors

cortadocodes 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.