Skip to content

Commit

Permalink
workflow: add PR and ISSUE template, close #51 (#52)
Browse files Browse the repository at this point in the history
* chore: update cz-git config and version

link #51

* chore: add PR template

link #51

* chore: add ISSUE template

link #51

* chore: update ISSUE template

link #51

* chore: add issue links config

link #51

* chore: update Environment info render of ISSUE template

link #51

* chore: update ISSUE template

link #51

* chore: update ISSUE template

Co-authored-by: Xiaohan Zou <[email protected]>
  • Loading branch information
Zhengqbbb and Renovamen authored Apr 9, 2022
1 parent 9db4cda commit 4d63d55
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 16 deletions.
17 changes: 11 additions & 6 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ const { execSync } = require("child_process");
const fs = require("fs");
const path = require("path");

const plugins = fs
.readdirSync(path.resolve(__dirname, "packages/plugins"))
.map((value) => `plugin-${value}`);

// branch: feat_36 => #36
// @example: Branch Name: feature/issue_36 => #36
const issue = execSync("git rev-parse --abbrev-ref HEAD")
.toString()
.trim()
.split("_")[1];

const plugins = fs
.readdirSync(path.resolve(__dirname, "packages/plugins"))
.map((value) => `plugin-${value}`);

/** @type {import('cz-git').UserConfig} */
module.exports = {
extends: ["@commitlint/config-conventional"],
Expand All @@ -20,6 +20,11 @@ module.exports = {
},
prompt: {
customScopesAlign: "top",
defaultIssues: () => (!issue ? "" : `#${issue}`)
customIssuePrefixsAlign: !issue ? "top" : "bottom",
defaultIssues: !issue ? "" : `#${issue}`,
issuePrefixs: [
{ value: "link", name: "link: Link to ISSUES" },
{ value: "closed", name: "closed: ISSUES has been processed" }
]
}
};
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Bug report
description: 🐞 Create a report to help us improve
title: "[Bug report]"
labels:
- bug
assignees: Renovamen
body:
- type: checkboxes
id: checklist
attributes:
label: ✅ Checklist
description: Make sure that you follow these statements.
options:
- label: I am using the **latest version**
required: true

- type: textarea
id: description
attributes:
label: 🔎 Description
description: A clear and concise description of what the bug is.And input a clear and concise description of what you expected to happen.
value: "#### Concise Description\n\n#### Expected behavior\n\n#### Steps to reproduce\n\n#### Screenshots or Screen Recording (if possible)"
validations:
required: true

- type: textarea
id: environment
attributes:
label: 📄 Environment info (`npx vuepress info`)
description: "1. Open your terminal\n2. Make sure you are under the project path \n3. Input command line `npx vuepress info`"
render: shell
validations:
required: true

- type: input
id: link
attributes:
label: "🔗 Reproduction link / repo:"
description: If applicable, give us the project address, or minimize test cases repo to help us explain your problem.
placeholder: "link / repo URL"
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: en_US Documents
url: https://v2-vuepress-theme-gungnir.vercel.app/docs/basic/intro.html
about: vuepress-theme-gungnir V2 Usage Guide

- name: zh-CN Documents
url: https://v2-vuepress-theme-gungnir.vercel.app/zh/docs/basic/intro.html
about: vuepress-theme-gungnir V2 简体中文文档
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Feature request
description: 💡 Suggest an idea for this project
title: "[Feature Request]"
labels:
- enhancement
assignees: Renovamen
body:
- type: textarea
id: feature
attributes:
label: 💭 Describe the feature
description: What's it for and why you want
placeholder: A clear and concise description of what the feature is, and what it will enhance or solve.
validations:
required: true

- type: textarea
id: proposed-solution
attributes:
label: 💡 Proposed Solution
description: "Describe a clear and concise description of what you want to happen.\nIf possible, please provide relevant **screenshots or videos**."
placeholder: "Describe a clear and concise description of what you want to happen."

32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Related ISSUE

> Input follow ISSUE URL address
<!-- link #33 -->

## Type Of Change

- [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 📝 Document (This change requires a documentation update)
- [ ] 🎨 Theme style (Theme style beautification)
- [ ] ⚠ Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] 🔨 Workflow (Workflow changes)

## Clear Describe

> A clear and concise description of what update for target.
<!--
input summary. e.g:
- feat: add link card container
- docs: add link card container usage guide
-->

## Description

> Please enter detailed relevant motivation, background and implementation ... descriptive information.
## Test Case

> Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test case.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"anywhere": "^1.5.0",
"cpx2": "^4.2.0",
"cross-env": "^7.0.3",
"cz-git": "^1.1.7",
"cz-git": "^1.2.3",
"eslint": "^8.10.0",
"eslint-config-vuepress": "^3.5.0",
"eslint-config-vuepress-typescript": "^2.5.0",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1196,10 +1196,10 @@
dependencies:
"@cspotcode/source-map-consumer" "0.8.0"

"@cz-git/loader@^1.1.6":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@cz-git/loader/-/loader-1.1.6.tgz#a81813a4cbd92f9f88a3b06ac594988d70e8229c"
integrity sha512-rwdpiqD3D3SrRkzb8RMpNcGs1Zg0RlTzYRmNStLiUpYzyQjB+Qwe9yrB3Y14sFTdQW3T07nI6rNWXtboHj47OQ==
"@cz-git/loader@1.2.3":
version "1.2.3"
resolved "https://registry.npmjs.org/@cz-git/loader/-/loader-1.2.3.tgz#daaa1fa3250717d1dfa897aabcb47f5759936b24"
integrity sha512-FdLdCBp9AV42sQKdZ/poWLHaMrbr/ItuEaH20ufk3Q0jz+hwdi6+MSIQjFZSeiFXdb57lNXY0f54Hzx+HLyDGg==
dependencies:
"@commitlint/load" "16.2.1"
strip-json-comments "3.1.1"
Expand Down Expand Up @@ -4270,12 +4270,12 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33"
integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==

cz-git@^1.1.7:
version "1.1.8"
resolved "https://registry.yarnpkg.com/cz-git/-/cz-git-1.1.8.tgz#c5f85a3a4b55f232c52bd121914a0fa2a5c49fff"
integrity sha512-mIOpdtbFr2oJqqKK/KuDKKDb6fDtEcxaOWR9XzIENUWB15EhHwOvw7IR8DF/HiioICY1EeEZSZXEI8fDtNlUSA==
cz-git@^1.2.3:
version "1.2.3"
resolved "https://registry.npmjs.org/cz-git/-/cz-git-1.2.3.tgz#7524f8b2e73a25e460cd6ad484b0be3a2d530d27"
integrity sha512-brXWBPSBFQgBs8v6kKsE7O9nkm8mD/fyDVBsurnvFgClvQ1YIVneaBBO41eYnFWKiX2qEvefX9SvrVADS4vZsw==
dependencies:
"@cz-git/loader" "^1.1.6"
"@cz-git/loader" "1.2.3"
inquirer "^7.3.3"
inquirer-autocomplete-prompt "1.4.0"
rimraf "3.0.2"
Expand Down

1 comment on commit 4d63d55

@vercel
Copy link

@vercel vercel bot commented on 4d63d55 Apr 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.