Skip to content

Commit

Permalink
ci: auto label and release draft (OpenAtomFoundation#2159)
Browse files Browse the repository at this point in the history
  • Loading branch information
baerwang authored Nov 22, 2023
1 parent 9b2a916 commit 113da5d
Show file tree
Hide file tree
Showing 10 changed files with 283 additions and 58 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Bug Report
description: Report a bug in the PikiwiDB
labels: [ "☢️ Bug" ]

body:
- type: dropdown
id: is-regression
attributes:
label: Is this a regression?
options:
- 'Yes'
- 'No'
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
validations:
required: true

- type: input
id: reproduction
attributes:
label: Please provide a link to a minimal reproduction of the bug

- type: textarea
attributes:
label: Screenshots or videos
description: If you can, upload any screenshots of the bug.
value: |
![images](https://camo.githubusercontent.com/3f51b5a32e6e5d5adabdebc5ef968150bdabc8d17a8dc1a535b8fb255d2165d0/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f616e7466696e63646e2f79396b776737445643642f726570726f647563652e676966)
- type: textarea
id: environment
attributes:
label: Please provide the version you discovered this bug in (check about page for version information)
render: true
placeholder: |
Version: v0.0.1
Commit Hash: 7c9b67171b4d2fbdd37218e59dbabe64451d9d68
Build Date: Oct 11, 2023, 10:49 AM GMT+8
OS: linux x64
- type: textarea
id: other
attributes:
label: Anything else?
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Feature Request'
description: Suggest a feature for PikiwiDB
labels: [ "✏️ Feature" ]

body:
- type: dropdown
id: affected-packages
attributes:
label: Which PikiwiDB functionalities are relevant/related to the feature request?
options:
- other
multiple: true

- type: textarea
id: description
attributes:
label: Description
validations:
required: true

- type: textarea
id: proposed-solution
attributes:
label: Proposed solution
validations:
required: true

- type: textarea
id: alternatives-considered
attributes:
label: Alternatives considered
validations:
required: true
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/3-docs-bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'Docs or https://github.com/OpenAtomFoundation/pika/wiki Bug Report'
description: Report an issue in PikiwiDB's documentation
labels: [ "📒 Documentation" ]

body:
- type: textarea
id: description
attributes:
label: Describe the problem that you experienced
validations:
required: true

- type: input
id: affected-url
attributes:
label: Enter the URL of the topic with the problem

- type: textarea
id: documentation-goal
attributes:
label: Describe what you were looking for in the documentation

- type: textarea
id: reproduction-steps
attributes:
label: Describe the actions that led you to experience the problem

- type: textarea
id: expected-vs-actual-behavior
attributes:
label: Describe what you want to experience that would fix the problem

- type: textarea
id: screenshot
attributes:
label: Add a screenshot if that helps illustrate the problem

- type: textarea
id: exception-or-error
attributes:
label: If this problem caused an exception or error, please paste it here
render: true
placeholder: |
```
Paste the exception or error here inside a markdown code block,
which is annotated by three grave \(`\) characters before and after the text block.
```
- type: textarea
id: browser-info
attributes:
label: If the problem is browser-specific, please specify the device, OS, browser, and version
render: true

- type: textarea
id: additional-info
attributes:
label: Provide any additional information here in as much as detail as you can
render: true
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
target-branch: "3.0"

- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "monthly"
target-branch: "3.0"
13 changes: 13 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"LABEL": {
"name": "Invalid PR Title",
"color": "B60205"
},
"CHECKS": {
"regexp": "^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(\\(.*\\))?:.*",
"ignoreLabels": [
"ignore-title"
]
}
}

68 changes: 68 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: '❗ Breaking Changes:'
labels:
- '❗ Breaking Change'
- title: '🚀 New Features:'
labels:
- '✏️ Feature'
- title: '🐛 Fixes:'
labels:
- '☢️ Bug'
- title: '📚 Documentation:'
labels:
- '📒 Documentation'
- title: '🧹 Updates:'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&'
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- '❗ Breaking Change'
minor:
labels:
- '✏️ Feature'
patch:
labels:
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES
Version tags:
- `https://github.com/$OWNER/$REPOSITORY/releases/tag/v$RESOLVED_VERSION`
**📒 Documentation**: PikiwiDB
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
Thanks to $CONTRIBUTORS for making this release possible.
autolabeler:
- label: '📒 Documentation'
files:
- '*.md'
title:
- '/(docs|doc:|\[doc\]|typos|comment|documentation)/i'
- label: '☢️ Bug'
title:
- '/(fix|race|bug|missing|correct)/i'
- label: '🧹 Updates'
title:
- '/(improve|update|update|refactor|deprecated|remove|unused|test)/i'
- label: '🤖 Dependencies'
title:
- '/(bump|dependencies)/i'
- label: '✏️ Feature'
title:
- '/(feature|feat|create|implement|add)/i'
19 changes: 19 additions & 0 deletions .github/workflows/pr-title-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "PR Title Checker"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json #(optional. defaults to .github/pr-title-checker-config.json)
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

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

permissions:
contents: read

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

0 comments on commit 113da5d

Please sign in to comment.