Skip to content

Commit

Permalink
Merge pull request #21 from barracuda-cloudgen-access/add-support-tools
Browse files Browse the repository at this point in the history
Add repository support tools
  • Loading branch information
GMartinez-Sisti authored Apr 4, 2022
2 parents d98f619 + ba3879a commit a5fba48
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
labels:
- "chore"
- "dependencies"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&'
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
46 changes: 46 additions & 0 deletions .github/workflows/label-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Label Merge Checks

on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]

jobs:
do-not-merge:
if: ${{ contains(github.event.*.labels.*.name, 'do not merge') }}
name: Prevent Merging
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is labeled as 'do not merge'"
echo "This workflow fails so that the pull request cannot be merged"
exit 1
require-semver:
if: |
!(contains(github.event.*.labels.*.name, 'patch') ||
contains(github.event.*.labels.*.name, 'minor') ||
contains(github.event.*.labels.*.name, 'major') ||
contains(github.event.*.labels.*.name, 'skip-semver'))
name: Require Semver
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is missing semver label!"
echo "This workflow fails so that the pull request cannot be merged!"
exit 1
require-category:
if: |
!(contains(github.event.*.labels.*.name, 'feature') ||
contains(github.event.*.labels.*.name, 'fix') ||
contains(github.event.*.labels.*.name, 'chore') ||
contains(github.event.*.labels.*.name, 'docs') ||
contains(github.event.*.labels.*.name, 'dependencies'))
name: Require Category
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is missing category label (feature/fix/chore)!"
echo "This workflow fails so that the pull request cannot be merged!"
exit 1
15 changes: 15 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Release Drafter

on:
push:
branches:
- main

jobs:
update-release-draft:
name: Update Release Draft
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a5fba48

Please sign in to comment.