Skip to content

szymansd/auto-release-notes

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Release Notes

A GitHub action to create release notes for pull request.

Usage


Pre-requisites

Create a workflow .yml file in your repositories .github/workflows directory. For more information, reference the GitHub Help Documentation.

This workflow will be running only if it's run for pull request. Otherwise it will fail with message: This is not a Pull Request.

Inputs

  • github_token: Github token
  • feature_commit_pattern: Feature commit pattern. Example: JIRA-. You can use same pattern as for autolinking issues.
  • description_template: This is a description template use {{features}} to replace it by list of commits matched using feature_commit_pattern and {{chores}} will be replace by commit description list not matched feature_commit_pattern. Default value:
    # Features:
    {{features}}
    # Chores:
    {{chores}}
    
  • description_template_filepath: If you need to use more complex template you can use MD file. Use {{feature_commits}} in the template to replace it with list of commits matched using feature_commit_pattern and {{chores_commits}} will be replace by commit description list not matched feature_commit_pattern. This will overwrite description_template. If file not exist will fallback to description_template. Sample template file can be found here.
  • title_template: This is a pattern for PR name. {{date}} will be replace by D MM. Default value: Deployment {{date}}

Example workflow

name: Test Action

on:
  workflow_dispatch:
  pull_request:
    branches:
      - main

jobs:
  test-correct:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Test action
        uses: szymansd/auto-release-notes@v1.0.1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          description_template_filepath: './.github/templates/deployment.md'