Skip to content

Commit c4d6e59

Browse files
authored
chore: github action initial (#1)
* docs: add code of conduct * chore: github action initial
1 parent 552392b commit c4d6e59

File tree

5 files changed

+205
-0
lines changed

5 files changed

+205
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 🐞 Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
type: "Bug"
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for stopping by to let us know something could be better!
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: Also tell us what you expected to happen and how to reproduce the issue.
15+
placeholder: Tell us what you see!
16+
value: "A bug happened!"
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: logs
21+
attributes:
22+
label: Relevant log output
23+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
24+
render: shell
25+
- type: checkboxes
26+
id: terms
27+
attributes:
28+
label: Code of Conduct
29+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/zai-org/zai-coding-plugins/blob/main/CODE_OF_CONDUCT.md)
30+
options:
31+
- label: I agree to follow this project's Code of Conduct
32+
required: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 💡 Feature Request
2+
description: Suggest an idea for this repository
3+
title: "[Feat]: "
4+
type: "Feature"
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for stopping by to let us know something could be better!
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Is your feature request related to a problem? Please describe.
14+
description: A clear and concise description of what the problem is.
15+
placeholder: Ex. I'm always frustrated when [...]
16+
- type: textarea
17+
id: describe
18+
attributes:
19+
label: Describe the solution you'd like
20+
description: A clear and concise description of what you want to happen.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternatives
25+
attributes:
26+
label: Describe alternatives you've considered
27+
description: A clear and concise description of any alternative solutions or features you've considered.
28+
- type: textarea
29+
id: context
30+
attributes:
31+
label: Additional context
32+
description: Add any other context or screenshots about the feature request here.
33+
- type: checkboxes
34+
id: terms
35+
attributes:
36+
label: Code of Conduct
37+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/zai-org/zai-coding-plugins/blob/main/CODE_OF_CONDUCT.md)
38+
options:
39+
- label: I agree to follow this project's Code of Conduct
40+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Description
2+
3+
<!-- Thanks for opening a Pull Request, Describe Your PR Here -->
4+
5+
6+
7+
## Checklist
8+
9+
<!-- Before submitting your PR, there are a few things you can do to make sure it goes smoothly: -->
10+
11+
- [ ] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification.
12+
- [ ] Appropriate docs were updated (if necessary)
13+
14+
Fixes #<issue_number>
15+
16+
## Add or Update API
17+
18+
- [ ] I have added the necessary test case and all cases have passed.

.github/workflows/lint-pr.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Lint PR"
2+
3+
on:
4+
pull_request_target:
5+
pull_request:
6+
7+
jobs:
8+
lint-pr:
9+
name: Validate PR title
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: read
13+
steps:
14+
- uses: amannn/action-semantic-pull-request@v5
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
with:
18+
subjectPattern: ^[a-zA-Z0-9!-_@#=*`.|+,\s]+$
19+
# If `subjectPattern` is configured, you can use this property to override
20+
# the default error message that is shown when the pattern doesn't match.
21+
# The variables `subject` and `title` can be used within the message.
22+
subjectPatternError: |
23+
The subject "{subject}" found in the pr title "{title}" didn't match the
24+
configured pattern. Can only chars, numbers and symbols !-_@#=*`|+.

CODE_OF_CONDUCT.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of
9+
experience, education, socio-economic status, nationality, personal appearance,
10+
race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or reject
41+
comments, commits, code, wiki edits, issues, and other contributions that are
42+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
43+
contributor for other behaviors that they deem inappropriate, threatening,
44+
offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
This Code of Conduct also applies outside the project spaces when the Project
56+
Steward has a reasonable belief that an individual's behavior may have a
57+
negative impact on the project or its community.
58+
59+
## Conflict Resolution
60+
61+
We do not believe that all conflict is bad; healthy debate and disagreement
62+
often yield positive results. However, it is never okay to be disrespectful or
63+
to engage in behavior that violates the project’s code of conduct.
64+
65+
If you see someone violating the code of conduct, you are encouraged to address
66+
the behavior directly with those involved. Many issues can be resolved quickly
67+
and easily, and this gives people more control over the outcome of their
68+
dispute. If you are unable to resolve the matter for any reason, or if the
69+
behavior is threatening or harassing, report it. We are dedicated to providing
70+
an environment where participants feel welcome and safe.
71+
72+
Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the
73+
Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to
74+
receive and address reported violations of the code of conduct. They will then
75+
work with a committee consisting of representatives from the Open Source
76+
Programs Office and the Z.ai Open Source Strategy team.
77+
78+
We will investigate every complaint, but you may not receive a direct response.
79+
We will use our discretion in determining when and how to follow up on reported
80+
incidents, which may range from not taking action to permanent expulsion from
81+
the project and project-sponsored spaces. We will notify the accused of the
82+
report and provide them an opportunity to discuss it before any action is taken.
83+
The identity of the reporter will be omitted from the details of the report
84+
supplied to the accused. In potentially harmful situations, such as ongoing
85+
harassment or threats to anyone's safety, we may take action without notice.
86+
87+
## Attribution
88+
89+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
90+
available at
91+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

0 commit comments

Comments
 (0)