Skip to content

Commit 57c1760

Browse files
committed
feat: add issue templates for bug reports and feature requests, and enhance PR template
chore: configure Dependabot and CodeQL workflows fix: update NPM publish workflow for improved automation docs: create CONTRIBUTING.md with guidelines for contributions
1 parent d418616 commit 57c1760

File tree

9 files changed

+554
-39
lines changed

9 files changed

+554
-39
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
12+
A clear and concise description of the bug.
13+
14+
## Steps to Reproduce
15+
16+
1. Install `@labeg/code-style` version X.X.X
17+
2. Configure ESLint with '...'
18+
3. Run ESLint on '...'
19+
4. See error
20+
21+
## Expected Behavior
22+
23+
What you expected to happen.
24+
25+
## Actual Behavior
26+
27+
What actually happened.
28+
29+
## Code Sample
30+
31+
```javascript
32+
// Minimal code example that demonstrates the issue
33+
```
34+
35+
## ESLint Configuration
36+
37+
```javascript
38+
// Your eslint.config.js
39+
```
40+
41+
## Environment
42+
43+
- **@labeg/code-style version**: [e.g., 6.9.0]
44+
- **ESLint version**: [e.g., 9.39.1]
45+
- **Node.js version**: [e.g., 20.10.0]
46+
- **npm/pnpm version**: [e.g., npm 10.2.3]
47+
- **Operating System**: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
48+
- **TypeScript version** (if applicable): [e.g., 5.3.3]
49+
- **React version** (if applicable): [e.g., 19.0.0]
50+
51+
## Additional Context
52+
53+
Add any other context, screenshots, or error messages here.
54+
55+
## Possible Solution
56+
57+
If you have ideas on how to fix this, please share them.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Feature Description
11+
12+
A clear and concise description of the feature you'd like to see.
13+
14+
## Problem Statement
15+
16+
What problem would this feature solve? Is your feature request related to a problem?
17+
18+
**Example:** "I'm frustrated when [...]"
19+
20+
## Proposed Solution
21+
22+
Describe the solution you'd like to see implemented.
23+
24+
## Alternatives Considered
25+
26+
Describe any alternative solutions or features you've considered.
27+
28+
## Use Cases
29+
30+
Provide specific examples of how this feature would be used:
31+
32+
1. Use case 1...
33+
2. Use case 2...
34+
35+
## Code Examples
36+
37+
If applicable, provide example code showing how you envision using this feature:
38+
39+
```javascript
40+
// Example of proposed usage
41+
```
42+
43+
## Impact
44+
45+
- **Who benefits**: [developers, teams, specific use cases]
46+
- **Breaking changes**: [yes/no - explain if yes]
47+
- **Backward compatibility**: [maintained/affected]
48+
49+
## Additional Context
50+
51+
Add any other context, screenshots, or examples about the feature request here.
52+
53+
## Willingness to Contribute
54+
55+
- [ ] I'm willing to submit a PR to implement this feature
56+
- [ ] I can help with testing
57+
- [ ] I can help with documentation

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
## Description
2+
3+
<!-- Provide a brief description of your changes -->
4+
5+
## Related Issue
6+
7+
<!-- Link to the issue this PR addresses -->
8+
Closes #
9+
10+
## Type of Change
11+
12+
<!-- Check all that apply -->
13+
14+
- [ ] Bug fix (non-breaking change which fixes an issue)
15+
- [ ] New feature (non-breaking change which adds functionality)
16+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
17+
- [ ] Documentation update
18+
- [ ] Code refactoring
19+
- [ ] Dependency update
20+
21+
## Changes Made
22+
23+
<!-- List the main changes in this PR -->
24+
25+
-
26+
-
27+
-
28+
29+
## Testing
30+
31+
<!-- Describe the tests you ran -->
32+
33+
- [ ] I have run `npm test` and all tests pass
34+
- [ ] I have tested the changes manually
35+
- [ ] I have added/updated tests for my changes
36+
37+
## Code Quality
38+
39+
- [ ] My code follows the code style of this project
40+
- [ ] I have performed a self-review of my own code
41+
- [ ] I have commented my code, particularly in hard-to-understand areas
42+
- [ ] My changes generate no new warnings
43+
- [ ] No console.log or debugging code left in
44+
45+
## Documentation
46+
47+
- [ ] I have updated the README.md (if applicable)
48+
- [ ] I have updated the CHANGELOG.md (if applicable)
49+
- [ ] I have added/updated code comments
50+
51+
## Breaking Changes
52+
53+
<!-- If this is a breaking change, describe what breaks and migration path -->
54+
55+
N/A
56+
57+
## Screenshots / Examples
58+
59+
<!-- If applicable, add screenshots or code examples -->
60+
61+
```javascript
62+
// Example code showing the changes
63+
```
64+
65+
## Checklist
66+
67+
- [ ] This PR has a descriptive title
68+
- [ ] All commits follow [Conventional Commits](https://www.conventionalcommits.org/)
69+
- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) guide
70+
- [ ] This PR is ready for review
71+
72+
## Additional Notes
73+
74+
<!-- Any additional information or context -->

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
updates:
3+
# NPM dependencies
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "tuesday"
9+
time: "09:00"
10+
open-pull-requests-limit: 1
11+
groups:
12+
all-minor-patch:
13+
patterns:
14+
- "*"
15+
update-types:
16+
- "minor"
17+
- "patch"
18+
commit-message:
19+
prefix: "chore"
20+
prefix-development: "chore"
21+
include: "scope"
22+
labels:
23+
- "dependencies"
24+
assignees:
25+
- "LabEG"
26+
27+
# GitHub Actions
28+
- package-ecosystem: "github-actions"
29+
directory: "/"
30+
schedule:
31+
interval: "weekly"
32+
day: "tuesday"
33+
time: "09:00"
34+
commit-message:
35+
prefix: "ci"
36+
include: "scope"
37+
labels:
38+
- "dependencies"
39+
assignees:
40+
- "LabEG"

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '0 0 * * 1' # Каждый понедельник в 00:00
10+
11+
permissions:
12+
actions: read
13+
contents: read
14+
security-events: write
15+
16+
jobs:
17+
analyze:
18+
name: Analyze Code
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 360
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
language: [ 'javascript-typescript' ]
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v6
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v4
33+
with:
34+
languages: ${{ matrix.language }}
35+
queries: security-extended,security-and-quality
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v4
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v4
42+
with:
43+
category: "/language:${{matrix.language}}"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Dependabot Auto-merge
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
enable-auto-merge:
13+
runs-on: ubuntu-latest
14+
# Срабатывает ТОЛЬКО для Dependabot PR
15+
if: github.actor == 'dependabot[bot]'
16+
17+
steps:
18+
- name: Dependabot metadata
19+
id: metadata
20+
uses: dependabot/fetch-metadata@v2
21+
with:
22+
github-token: "${{ secrets.GITHUB_TOKEN }}"
23+
24+
- name: Wait for test completion
25+
uses: lewagon/wait-on-check-action@v1.4.1
26+
with:
27+
ref: ${{ github.event.pull_request.head.sha }}
28+
check-name: 'test'
29+
repo-token: ${{ secrets.GITHUB_TOKEN }}
30+
wait-interval: 10
31+
32+
- name: Approve PR
33+
run: gh pr review --approve "$PR_URL"
34+
env:
35+
PR_URL: ${{ github.event.pull_request.html_url }}
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Merge PR
39+
run: gh pr merge --squash "$PR_URL"
40+
env:
41+
PR_URL: ${{ github.event.pull_request.html_url }}
42+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)