Skip to content

Commit 74feba8

Browse files
committed
Initial commit: WP Telegram Post Notifier plugin with comprehensive documentation
0 parents  commit 74feba8

169 files changed

Lines changed: 27111 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
extends: [
8+
'@wordpress/eslint-plugin/recommended',
9+
'prettier',
10+
],
11+
parser: '@typescript-eslint/parser',
12+
parserOptions: {
13+
ecmaVersion: 'latest',
14+
sourceType: 'module',
15+
},
16+
plugins: ['@typescript-eslint'],
17+
rules: {
18+
'@wordpress/no-global-event-listener': 'off',
19+
'@wordpress/no-global-get-selection': 'off',
20+
'@typescript-eslint/no-unused-vars': 'error',
21+
'prettier/prettier': 'error',
22+
},
23+
settings: {
24+
'import/resolver': {
25+
typescript: {},
26+
},
27+
},
28+
};
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve WP Telegram Post Notifier
4+
title: '[BUG] '
5+
labels: ['bug', 'needs-triage']
6+
assignees: ''
7+
---
8+
9+
## 🐛 Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## 🔄 Steps to Reproduce
13+
1. Go to '...'
14+
2. Click on '....'
15+
3. Scroll down to '....'
16+
4. See error
17+
18+
## 🎯 Expected Behavior
19+
A clear and concise description of what you expected to happen.
20+
21+
## 📱 Screenshots
22+
If applicable, add screenshots to help explain your problem.
23+
24+
## 🖥️ Environment
25+
- **WordPress Version**: [e.g. 6.4]
26+
- **PHP Version**: [e.g. 8.1]
27+
- **Plugin Version**: [e.g. 1.0.0]
28+
- **Browser**: [e.g. Chrome 120]
29+
- **OS**: [e.g. Windows 11]
30+
31+
## 📋 Additional Context
32+
Add any other context about the problem here.
33+
34+
## 🔍 Error Logs
35+
If applicable, paste any error logs here:
36+
37+
```
38+
Paste error logs here
39+
```
40+
41+
## ✅ Checklist
42+
- [ ] I have searched existing issues to ensure this is not a duplicate
43+
- [ ] I have provided all the requested information
44+
- [ ] I have tested with the latest version of the plugin
45+
- [ ] I have tested with a default WordPress theme
46+
- [ ] I have deactivated other plugins to rule out conflicts

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: GitHub Community Support
4+
url: https://github.com/VoxHash/WPTelegram-Post-Notifier/discussions
5+
about: Please ask and answer questions here.
6+
- name: Documentation
7+
url: https://github.com/VoxHash/WPTelegram-Post-Notifier/wiki
8+
about: Check our documentation for guides and tutorials.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for WP Telegram Post Notifier
4+
title: '[FEATURE] '
5+
labels: ['enhancement', 'needs-triage']
6+
assignees: ''
7+
---
8+
9+
## 🚀 Feature Description
10+
A clear and concise description of what you want to happen.
11+
12+
## 💡 Motivation
13+
Is your feature request related to a problem? Please describe.
14+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
15+
16+
## 🎯 Proposed Solution
17+
Describe the solution you'd like
18+
A clear and concise description of what you want to happen.
19+
20+
## 🔄 Alternatives Considered
21+
Describe any alternative solutions or features you've considered.
22+
23+
## 📋 Additional Context
24+
Add any other context or screenshots about the feature request here.
25+
26+
## 🎨 Design Considerations
27+
If this feature involves UI changes, please describe:
28+
- How should it look?
29+
- Where should it be placed?
30+
- Any specific design requirements?
31+
32+
## 🔧 Technical Considerations
33+
If you have technical knowledge, please describe:
34+
- Any technical requirements
35+
- Potential implementation approaches
36+
- Compatibility considerations
37+
38+
## ✅ Checklist
39+
- [ ] I have searched existing issues to ensure this is not a duplicate
40+
- [ ] I have provided all the requested information
41+
- [ ] I have considered the plugin's design philosophy
42+
- [ ] I have checked if this aligns with the project roadmap
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## 📝 Description
2+
A clear and concise description of what this PR does.
3+
4+
## 🔗 Related Issue
5+
Fixes #(issue number)
6+
7+
## 🎯 Type of Change
8+
- [ ] Bug fix (non-breaking change which fixes an issue)
9+
- [ ] New feature (non-breaking change which adds functionality)
10+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
11+
- [ ] Documentation update
12+
- [ ] Code refactoring
13+
- [ ] Performance improvement
14+
- [ ] Test coverage improvement
15+
16+
## 🧪 Testing
17+
- [ ] I have tested this change locally
18+
- [ ] I have added tests that prove my fix is effective or that my feature works
19+
- [ ] New and existing unit tests pass locally with my changes
20+
- [ ] I have tested with different WordPress versions
21+
- [ ] I have tested with different PHP versions
22+
23+
## 📋 Checklist
24+
- [ ] My code follows the project's style guidelines
25+
- [ ] I have performed a self-review of my own code
26+
- [ ] I have commented my code, particularly in hard-to-understand areas
27+
- [ ] I have made corresponding changes to the documentation
28+
- [ ] My changes generate no new warnings
29+
- [ ] I have added tests that prove my fix is effective or that my feature works
30+
- [ ] New and existing unit tests pass locally with my changes
31+
- [ ] Any dependent changes have been merged and published
32+
33+
## 🎨 Screenshots (if applicable)
34+
Add screenshots to help explain your changes.
35+
36+
## 📚 Documentation
37+
- [ ] I have updated the README.md if needed
38+
- [ ] I have updated the CHANGELOG.md if needed
39+
- [ ] I have updated any relevant documentation
40+
41+
## 🔒 Security
42+
- [ ] My changes don't introduce security vulnerabilities
43+
- [ ] I have considered the security implications of my changes
44+
- [ ] I have followed WordPress security best practices
45+
46+
## 🚀 Performance
47+
- [ ] My changes don't negatively impact performance
48+
- [ ] I have considered the performance implications of my changes
49+
- [ ] I have tested performance with large datasets if applicable
50+
51+
## 🌍 Compatibility
52+
- [ ] My changes are compatible with WordPress 6.3+
53+
- [ ] My changes are compatible with PHP 7.4+
54+
- [ ] My changes don't break existing functionality
55+
- [ ] I have tested with different themes and plugins
56+
57+
## 📝 Additional Notes
58+
Add any additional notes about the PR here.

.github/workflows/ci.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
php-tests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
php-version: [7.4, 8.0, 8.1, 8.2]
15+
wordpress-version: [6.3, 6.4]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php-version }}
25+
extensions: mbstring, xml, ctype, iconv, intl, pdo_mysql, zip
26+
27+
- name: Setup WordPress test environment
28+
uses: WordPress/wordpress-develop-tests@v2
29+
with:
30+
wp-version: ${{ matrix.wordpress-version }}
31+
32+
- name: Install dependencies
33+
run: composer install --no-dev --optimize-autoloader
34+
35+
- name: Run PHPCS
36+
run: |
37+
composer global require wp-coding-standards/wpcs
38+
./vendor/bin/phpcs --standard=phpcs.xml
39+
40+
- name: Run PHPUnit tests
41+
run: ./vendor/bin/phpunit
42+
43+
js-tests:
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v4
49+
50+
- name: Setup Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '18'
54+
cache: 'npm'
55+
56+
- name: Install dependencies
57+
run: npm ci
58+
59+
- name: Run ESLint
60+
run: npm run lint:js
61+
62+
- name: Build assets
63+
run: npm run build
64+
65+
e2e-tests:
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v4
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: '18'
76+
cache: 'npm'
77+
78+
- name: Install dependencies
79+
run: npm ci
80+
81+
- name: Install Playwright browsers
82+
run: npx playwright install --with-deps
83+
84+
- name: Run Playwright tests
85+
run: npm run e2e
86+
87+
package:
88+
runs-on: ubuntu-latest
89+
needs: [php-tests, js-tests, e2e-tests]
90+
91+
steps:
92+
- name: Checkout code
93+
uses: actions/checkout@v4
94+
95+
- name: Setup Node.js
96+
uses: actions/setup-node@v4
97+
with:
98+
node-version: '18'
99+
cache: 'npm'
100+
101+
- name: Install dependencies
102+
run: npm ci
103+
104+
- name: Build assets
105+
run: npm run build
106+
107+
- name: Package plugin
108+
run: npm run package
109+
110+
- name: Upload artifact
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: wp-telegram-post-notifier
114+
path: dist/wp-telegram-post-notifier.zip

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '18'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build assets
26+
run: npm run build
27+
28+
- name: Package plugin
29+
run: npm run package
30+
31+
- name: Create Release
32+
uses: actions/create-release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
tag_name: ${{ github.ref }}
37+
release_name: Release ${{ github.ref }}
38+
body: |
39+
## Changes in this Release
40+
41+
See CHANGELOG.md for detailed changes.
42+
43+
## Installation
44+
45+
1. Download the plugin zip file below
46+
2. Go to WordPress Admin > Plugins > Add New > Upload Plugin
47+
3. Upload the zip file and activate
48+
draft: false
49+
prerelease: false
50+
51+
- name: Upload Release Asset
52+
uses: actions/upload-release-asset@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
upload_url: ${{ steps.create_release.outputs.upload_url }}
57+
asset_path: ./dist/wp-telegram-post-notifier.zip
58+
asset_name: wp-telegram-post-notifier.zip
59+
asset_content_type: application/zip

0 commit comments

Comments
 (0)