Browse Source

feat:add label for pull request automatically (ci/cd) (#806)

feat: Add Release Drafter configuration files

Add the Release Drafter configuration files to the repository. This includes the `.github/release-drafter.yml` and `.github/workflows/release-drafter.yml` files. These files define the templates, categories, and labels used for generating release notes and changelogs. The configuration also includes autolabeling rules based on the title and file patterns.

Co-authored-by: FengZhang <zfcode@qq.com>
tags/v2.0.0-rc01
LeeHao GitHub 5 months ago
parent
commit
1b1b96cc54
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 178 additions and 0 deletions
  1. +155
    -0
      .github/release-drafter.yml
  2. +23
    -0
      .github/workflows/release-drafter.yml

+ 155
- 0
.github/release-drafter.yml View File

@@ -0,0 +1,155 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'

categories:
- title: 'alignment/seata-java'
labels:
- 'alignment/seata-java'
- title: 'bug'
labels:
- 'bug'
- title: 'ci/cd'
labels:
- 'ci/cd'
- title: 'coding'
labels:
- 'coding'
- title: 'documentation'
labels:
- 'documentation'
- title: 'enhancement'
labels:
- 'enhancement'
- title: 'good first issue'
labels:
- 'good first issue'
- title: 'integration'
labels:
- 'integration'
- title: 'milestone'
labels:
- 'milestone'
- title: 'module/at'
labels:
- 'module/at'
- title: 'module/rm'
labels:
- 'module/rm'
- title: 'module/saga'
labels:
- 'module/saga'
- title: 'module/tcc'
labels:
- 'module/tcc'
- title: 'module/tm'
labels:
- 'module/tm'
- title: 'module/xa'
labels:
- 'module/xa'
- title: 'optimise'
labels:
- 'optimise'
- title: 'protocol'
labels:
- 'protocol'
- title: 'question'
labels:
- 'question'
- title: 'refactor'
labels:
- 'refactor'
- title: 'remoting'
labels:
- 'remoting'
- title: 'rm'
labels:
- 'rm'
- title: 'task: help-wanted'
labels:
- 'task: help-wanted'
- title: 'tm'
labels:
- 'tm'

change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&'
exclude-contributors:
- dependabot
- dependabot[bot]

version-resolver:
major:
labels:
- 'enhancement'
- 'module/at'
minor:
labels:
- 'enhancement'
- 'module/saga'
patch:
labels:
- 'bug'
- 'documentation'
- 'refactor'
default: patch

template: |
$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
**Contributors**: $CONTRIBUTORS

autolabeler:
- label: 'documentation'
files:
- '*.md'
- 'docs/**'
title:
- '/(docs?|typo|doc:|\[doc\]|comment)/i'

- label: 'bug'
title:
- '/(fix|bug|error|fail|correct|missing)/i'
- '/(race|deadlock)/i'

- label: 'enhancement'
title:
- '/(feat|feature|add|implement|create)/i'

- label: 'refactor'
title:
- '/(refactor|cleanup|deprecate|remove|unused)/i'

- label: 'ci/cd'
files:
- '.github/workflows/**'
title:
- '/(ci|cd|workflow|pipeline)/i'

- label: 'coding'
title:
- '/(bump|upgrade|dependencies?)/i'
files:
- 'go.mod'
- 'go.sum'

- label: 'question'
title:
- '/(question|ask|inquiry)/i'

- label: 'good first issue'
title:
- '/(good first issue|easy|beginner|help wanted)/i'

- label: 'module/saga'
title:
- '/(saga)/i'

- label: 'module/at'
title:
- '/(at)/i'
- label: 'module/xa'
title:
- '/(xa)/i'

+ 23
- 0
.github/workflows/release-drafter.yml View File

@@ -0,0 +1,23 @@
name: Release Drafter

on:
push:
branches:
- unstable
pull_request_target:
types: [ opened, reopened, synchronize ]

permissions:
contents: write
pull-requests: write

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading…
Cancel
Save