Skip to content

Commit dccd413

Browse files
committed
chore: add issue templates for bug reports and feature requests, update pull request template, and enhance security policy documentation
1 parent daaa588 commit dccd413

10 files changed

Lines changed: 647 additions & 6 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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. Deploy `botview` microservice version X.X.X
17+
2. Send request to '/render' endpoint
18+
3. Observe the behavior
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+
## Request Sample
30+
31+
```bash
32+
# Example request that demonstrates the issue
33+
curl http://localhost:3000/render/https://example.com
34+
```
35+
36+
## Configuration
37+
38+
```json
39+
// Environment variables or configuration
40+
```
41+
42+
## Environment
43+
44+
- **botview version**: [e.g., 2.3.5]
45+
- **NestJS version**: [e.g., 11.1.9]
46+
- **Node.js version**: [e.g., 20.10.0]
47+
- **Playwright version**: [e.g., 1.56.1]
48+
- **Docker version** (if using Docker): [e.g., 24.0.0]
49+
- **Operating System**: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
50+
- **Deployment**: [e.g., Docker, Kubernetes, standalone]
51+
52+
## Additional Context
53+
54+
Add any other context, screenshots, or error messages here.
55+
56+
## Possible Solution
57+
58+
If you have ideas on how to fix this, please share them.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
## API Examples
36+
37+
If applicable, provide example API requests showing how you envision using this feature:
38+
39+
```bash
40+
# Example request
41+
curl http://localhost:3000/render/https://example.com?wait=2000
42+
```
43+
44+
## Impact
45+
46+
- **Who benefits**: [developers, teams, specific use cases]
47+
- **Breaking changes**: [yes/no - explain if yes]
48+
- **Backward compatibility**: [maintained/affected]
49+
50+
## Additional Context
51+
52+
Add any other context, screenshots, or examples about the feature request here.
53+
54+
## Willingness to Contribute
55+
56+
- [ ] I'm willing to submit a PR to implement this feature
57+
- [ ] I can help with testing
58+
- [ ] 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: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
version: 2
2+
updates:
3+
# NPM dependencies
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "thursday"
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+
eslint-plugins:
19+
patterns:
20+
- "eslint*"
21+
- "@typescript-eslint/*"
22+
- "@stylistic/*"
23+
nestjs-ecosystem:
24+
patterns:
25+
- "@nestjs/*"
26+
development-dependencies:
27+
dependency-type: "development"
28+
exclude-patterns:
29+
- "eslint*"
30+
- "@nestjs/*"
31+
commit-message:
32+
prefix: "chore"
33+
prefix-development: "chore"
34+
include: "scope"
35+
labels:
36+
- "dependencies"
37+
assignees:
38+
- "LabEG"
39+
40+
# Docker
41+
- package-ecosystem: "docker"
42+
directory: "/"
43+
schedule:
44+
interval: "weekly"
45+
day: "thursday"
46+
time: "09:00"
47+
commit-message:
48+
prefix: "chore"
49+
include: "scope"
50+
labels:
51+
- "dependencies"
52+
assignees:
53+
- "LabEG"
54+
55+
# GitHub Actions
56+
- package-ecosystem: "github-actions"
57+
directory: "/"
58+
schedule:
59+
interval: "weekly"
60+
day: "thursday"
61+
time: "09:00"
62+
commit-message:
63+
prefix: "ci"
64+
include: "scope"
65+
labels:
66+
- "dependencies"
67+
assignees:
68+
- "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: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: '0 0 * * 4' # Каждый четверг в 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 }}

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ name: Docker
88
on:
99
push:
1010
branches: [ main ]
11+
schedule:
12+
- cron: '0 12 1-7 1,7 4' # First Thursday of January and July at 12:00 UTC
1113
workflow_dispatch:
1214

1315
jobs:
@@ -20,21 +22,20 @@ jobs:
2022

2123
steps:
2224
- name: Checkout repository
23-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2426

2527
- name: Log into registry docker.io
26-
uses: docker/login-action@v2
28+
uses: docker/login-action@v3
2729
with:
2830
registry: docker.io
2931
username: ${{ secrets.DOCKERHUB_USER }}
3032
password: ${{ secrets.DOCKERHUB_TOKEN }}
3133

3234
- name: Build and publish package
33-
uses: actions/setup-node@v3
35+
uses: actions/setup-node@v6
3436
with:
3537
node-version: 24
3638
registry-url: https://registry.npmjs.org/
37-
3839
- run: git config --global user.email "elabutin@mts.ru"
3940
- run: git config --global user.name "Eugene Labutin"
4041
- run: npm ci
@@ -50,12 +51,11 @@ jobs:
5051
echo "PATCH=$(echo $VERSION | cut -d. -f3)" >> $GITHUB_ENV
5152
5253
- name: Build and push Docker image
53-
uses: docker/build-push-action@v3
54+
uses: docker/build-push-action@v6
5455
with:
5556
push: true
5657
tags: |
5758
mtsrus/botview:latest
5859
mtsrus/botview:${{ env.MAJOR }}
5960
mtsrus/botview:${{ env.MAJOR }}.${{ env.MINOR }}
6061
mtsrus/botview:${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}
61-

0 commit comments

Comments
 (0)