Skip to content

Commit 8f7175a

Browse files
committed
chore: add issue templates for bug reports and feature requests, and enhance contribution guidelines
1 parent dc4eec5 commit 8f7175a

File tree

11 files changed

+743
-96
lines changed

11 files changed

+743
-96
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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 `image-optimize` service version X.X.X
17+
2. Send POST request to '/optimize' endpoint with an image
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+
```json
32+
// Example POST request that demonstrates the issue
33+
// Multipart form data with image file
34+
{
35+
"format": "webp",
36+
"quality": 80
37+
}
38+
```
39+
40+
## Configuration
41+
42+
```json
43+
// Environment variables or configuration
44+
```
45+
46+
## Environment
47+
48+
- **image-optimize version**: [e.g., 1.6.3]
49+
- **NestJS version**: [e.g., 11.1.9]
50+
- **Node.js version**: [e.g., 20.10.0]
51+
- **Docker version** (if using Docker): [e.g., 24.0.0]
52+
- **Operating System**: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
53+
- **Deployment**: [e.g., Docker, Kubernetes, standalone]
54+
55+
## Additional Context
56+
57+
Add any other context, screenshots, or error messages here.
58+
59+
## Possible Solution
60+
61+
If you have ideas on how to fix this, please share them.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
```json
40+
// Example POST request (multipart/form-data)
41+
{
42+
"format": "avif",
43+
"quality": 85,
44+
"resize": "800x600"
45+
}
46+
```
47+
48+
## Impact
49+
50+
- **Who benefits**: [developers, teams, specific use cases]
51+
- **Breaking changes**: [yes/no - explain if yes]
52+
- **Backward compatibility**: [maintained/affected]
53+
54+
## Additional Context
55+
56+
Add any other context, screenshots, or examples about the feature request here.
57+
58+
## Willingness to Contribute
59+
60+
- [ ] I'm willing to submit a PR to implement this feature
61+
- [ ] I can help with testing
62+
- [ ] 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/[email protected]
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: 5 additions & 7 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,10 +22,7 @@ jobs:
2022

2123
steps:
2224
- name: Checkout repository
23-
uses: actions/checkout@v4
24-
with:
25-
token: ${{ secrets.GITHUB_TOKEN }}
26-
fetch-depth: 0
25+
uses: actions/checkout@v6
2726

2827
- name: Log into registry docker.io
2928
uses: docker/login-action@v3
@@ -33,11 +32,10 @@ jobs:
3332
password: ${{ secrets.DOCKERHUB_TOKEN }}
3433

3534
- name: Build and publish package
36-
uses: actions/setup-node@v3
35+
uses: actions/setup-node@v6
3736
with:
3837
node-version: 24
3938
registry-url: https://registry.npmjs.org/
40-
4139
- run: git config --global user.email "[email protected]"
4240
- run: git config --global user.name "Eugene Labutin"
4341
- run: npm ci
@@ -53,7 +51,7 @@ jobs:
5351
echo "PATCH=$(echo $VERSION | cut -d. -f3)" >> $GITHUB_ENV
5452
5553
- name: Build and push Docker image
56-
uses: docker/build-push-action@v3
54+
uses: docker/build-push-action@v6
5755
with:
5856
push: true
5957
tags: |

0 commit comments

Comments
 (0)