Skip to content

Commit 3158c71

Browse files
authored
Templates
1 parent a718b02 commit 3158c71

7 files changed

Lines changed: 357 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: "PHPCS Failure"
3+
about: "Automated issue created when PHP CodeSniffer tests fail"
4+
title: "PHPCS WordPress Coding Standards Failure"
5+
labels: bug, phpcs, coding-standards, automated
6+
assignees: []
7+
---
8+
9+
## PHPCS WordPress Coding Standards Failure
10+
11+
The automated PHP CodeSniffer (PHPCS) test has detected coding standard violations in the Simple WP Site Exporter plugin.
12+
13+
### Details
14+
15+
- **PHP Version:** {{ env.PHP_VERSION }}
16+
- **WordPress Version:** Latest
17+
- **Test Date:** {{ date | date('YYYY-MM-DD HH:mm:ss') }}
18+
- **Workflow Run:** [View detailed logs]({{ env.WORKFLOW_URL }})
19+
20+
### Next Steps
21+
22+
This issue has been automatically created because the Simple WP Site Exporter plugin failed to meet WordPress coding standards. PHPCS checks for:
23+
24+
#### Checked Standards:
25+
1. **WordPress Core**: Core WordPress coding standards
26+
2. **WordPress Extra**: Extended WordPress coding standards
27+
3. **WordPress VIP**: WordPress VIP-specific standards
28+
4. **Security Standards**: Security-focused coding practices
29+
5. **PSR-12**: PHP-FIG PSR-12 basic coding standard
30+
31+
#### Common Issues:
32+
- Improper variable naming conventions
33+
- Missing or incorrect code documentation
34+
- Incorrect indentation or spacing
35+
- Missing sanitization or escaping
36+
- Improper use of WordPress functions
37+
- File and class naming violations
38+
39+
#### Recommended Actions:
40+
41+
1. **Review Logs**: Check the workflow logs for specific PHPCS violations
42+
2. **Local Testing**: Run PHPCS locally to see detailed error reports
43+
3. **Auto-Fix**: Use `phpcbf` to automatically fix simple issues
44+
4. **Manual Fix**: Address security and logic issues manually
45+
5. **Validate**: Re-run PHPCS to confirm all issues are resolved
46+
47+
#### Local Testing Commands:
48+
```bash
49+
# Install dependencies
50+
composer install
51+
52+
# Run PHPCS checks
53+
./vendor/bin/phpcs --standard=WordPress simple-wp-site-exporter.php
54+
55+
# Auto-fix simple issues
56+
./vendor/bin/phpcbf --standard=WordPress simple-wp-site-exporter.php
57+
58+
# Check specific files
59+
./vendor/bin/phpcs --standard=WordPress-Extra --report=full simple-wp-site-exporter.php
60+
```
61+
62+
Once fixed, please close this issue and reference it in the changelog.
63+
64+
---
65+
66+
*This issue was automatically generated by the PHPCS WordPress Coding Standards Test workflow.*
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
name: "PHPMD Failure"
3+
about: "Automated issue created when PHP Mess Detector tests fail"
4+
title: "PHPMD Code Quality Analysis Failure"
5+
labels: bug, phpmd, code-quality, automated
6+
assignees: []
7+
---
8+
9+
## PHPMD Code Quality Analysis Failure
10+
11+
The automated PHP Mess Detector (PHPMD) analysis has detected code quality issues in the Simple WP Site Exporter plugin.
12+
13+
### Details
14+
15+
- **PHP Version:** {{ env.PHP_VERSION }}
16+
- **WordPress Version:** Latest
17+
- **Test Date:** {{ date | date('YYYY-MM-DD HH:mm:ss') }}
18+
- **Workflow Run:** [View detailed logs]({{ env.WORKFLOW_URL }})
19+
20+
### Next Steps
21+
22+
This issue has been automatically created because the Simple WP Site Exporter plugin failed PHPMD code quality analysis. PHPMD detects:
23+
24+
#### Analyzed Areas:
25+
1. **Clean Code**: Code complexity and maintainability issues
26+
2. **Code Size**: Overly large classes, methods, or parameter lists
27+
3. **Design**: Poor object-oriented design patterns
28+
4. **Naming**: Inconsistent or unclear naming conventions
29+
5. **Unused Code**: Dead code that should be removed
30+
6. **Controversial**: Potentially problematic coding patterns
31+
32+
#### Common Issues:
33+
- **Cyclomatic Complexity**: Methods with too many decision paths
34+
- **NPath Complexity**: Methods with too many execution paths
35+
- **Long Methods**: Methods that are too lengthy and should be split
36+
- **Long Classes**: Classes that handle too many responsibilities
37+
- **Too Many Parameters**: Methods with excessive parameter counts
38+
- **Unused Variables**: Variables that are declared but never used
39+
- **Superglobals**: Direct access to superglobal variables
40+
- **CamelCase Violations**: Inconsistent naming conventions
41+
42+
#### Recommended Actions:
43+
44+
1. **Review Logs**: Check the workflow logs for specific PHPMD violations
45+
2. **Local Analysis**: Run PHPMD locally to get detailed reports
46+
3. **Refactor Code**: Break down complex methods and classes
47+
4. **Remove Dead Code**: Eliminate unused variables and methods
48+
5. **Improve Naming**: Use consistent and descriptive naming
49+
6. **Validate**: Re-run PHPMD to confirm improvements
50+
51+
#### Local Testing Commands:
52+
```bash
53+
# Install dependencies
54+
composer install
55+
56+
# Run PHPMD analysis
57+
./vendor/bin/phpmd simple-wp-site-exporter.php text cleancode,codesize,design,naming,unusedcode
58+
59+
# Generate HTML report
60+
./vendor/bin/phpmd simple-wp-site-exporter.php html cleancode,codesize,design,naming,unusedcode --reportfile phpmd-report.html
61+
62+
# Check specific rules
63+
./vendor/bin/phpmd simple-wp-site-exporter.php text codesize --minimumpriority 1
64+
```
65+
66+
#### Example Fixes:
67+
```php
68+
// Before: High complexity
69+
function complex_function($a, $b, $c, $d, $e) {
70+
if ($a) {
71+
if ($b) {
72+
if ($c) {
73+
// ...
74+
}
75+
}
76+
}
77+
}
78+
79+
// After: Reduced complexity
80+
function simple_function($data) {
81+
if (!$this->validate_data($data)) {
82+
return false;
83+
}
84+
return $this->process_data($data);
85+
}
86+
```
87+
88+
Once fixed, please close this issue and reference it in the changelog.
89+
90+
---
91+
92+
*This issue was automatically generated by the PHPMD Code Quality Analysis Test workflow.*
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: "PHPStan Analysis Failure"
3+
about: "Automated issue created when PHPStan static analysis fails"
4+
title: "PHPStan for WordPress Analysis Failed - PHP {{ env.PHP_VERSION }}"
5+
labels: ["bug", "phpstan", "static-analysis", "wordpress"]
6+
assignees: []
7+
---
8+
9+
## PHPStan for WordPress Static Analysis Failure
10+
11+
**PHP Version:** {{ env.PHP_VERSION }}
12+
**Workflow Run:** [{{ env.RUN_ID }}]({{ env.WORKFLOW_URL }})
13+
**Date:** {{ date | date('YYYY-MM-DD') }}
14+
15+
### Description
16+
The PHPStan for WordPress static analysis check has failed during the automated testing process.
17+
18+
### What happened?
19+
PHPStan for WordPress detected potential code issues during static analysis. This could indicate:
20+
21+
- Type safety issues specific to WordPress APIs
22+
- Potential bugs or inconsistencies in WordPress plugin code
23+
- WordPress coding standard violations
24+
- Incorrect usage of WordPress functions or hooks
25+
26+
### Next Steps
27+
1. Review the workflow logs at the link above
28+
2. Check the specific PHPStan error messages
29+
3. Fix any identified code issues
30+
4. Ensure WordPress-specific type annotations are correct
31+
5. Re-run the workflow to verify fixes
32+
33+
### Additional Information
34+
- This check uses WordPress-specific PHPStan rules
35+
- The analysis helps catch WordPress-related coding issues early
36+
- Consider updating code to follow WordPress best practices
37+
38+
---
39+
*This issue was automatically created by the PHPStan for WordPress workflow failure.*
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: "Psalm Static Analysis Failure"
3+
about: "Automated issue created when Psalm static analysis fails"
4+
title: "Psalm Static Analysis Failed"
5+
labels: ["bug", "psalm", "static-analysis"]
6+
assignees: []
7+
---
8+
9+
## Psalm Static Analysis Failed
10+
11+
The Psalm static analysis check has failed for the repository.
12+
13+
**Failure Details:**
14+
- **PHP Version:** {{ env.PHP_VERSION }}
15+
- **Workflow Run:** [View Details]({{ env.WORKFLOW_URL }})
16+
- **Run ID:** {{ env.RUN_ID }}
17+
18+
**What happened:**
19+
Psalm has detected potential issues in the code through static analysis.
20+
21+
**What needs to be done:**
22+
1. Review the Psalm output in the failed workflow run
23+
2. Address static analysis issues such as:
24+
- Type errors
25+
- Undefined variables or methods
26+
- Incorrect return types
27+
- Unused code
28+
- Potential null pointer issues
29+
3. Test locally with: `./vendor/bin/psalm`
30+
31+
**Resources:**
32+
- [Psalm Documentation](https://psalm.dev/)
33+
- [Psalm Error Levels](https://psalm.dev/docs/running_psalm/error_levels/)
34+
35+
This issue was automatically created by the CI/CD pipeline.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: "Security Vulnerability Detected"
3+
about: "Automated issue created when security vulnerabilities are detected"
4+
title: "Security Vulnerability Detected"
5+
labels: ["security", "vulnerability", "critical"]
6+
assignees: []
7+
---
8+
9+
## Security Vulnerability Detected
10+
11+
A security vulnerability has been detected in the project dependencies.
12+
13+
**Failure Details:**
14+
- **PHP Version:** {{ env.PHP_VERSION }}
15+
- **Workflow Run:** [View Details]({{ env.WORKFLOW_URL }})
16+
- **Run ID:** {{ env.RUN_ID }}
17+
18+
**What happened:**
19+
The security checker has identified known vulnerabilities in one or more of the project's dependencies.
20+
21+
**What needs to be done:**
22+
1. Review the security check output in the failed workflow run
23+
2. Identify which dependencies have vulnerabilities
24+
3. Update vulnerable dependencies to secure versions
25+
4. If updates are not available, consider:
26+
- Finding alternative packages
27+
- Applying patches if available
28+
- Implementing workarounds
29+
5. Test the application after updates
30+
31+
**⚠️ Priority:** This is a security issue and should be addressed immediately.
32+
33+
**Resources:**
34+
- [Symfony Security Checker](https://github.com/FriendsOfPHP/security-advisories)
35+
- [WordPress Security Best Practices](https://developer.wordpress.org/plugins/security/)
36+
37+
This issue was automatically created by the CI/CD pipeline.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: "WordPress Dependencies Monitoring Failure"
3+
about: "Automated issue created when WordPress dependencies monitoring fails"
4+
title: "WordPress Dependencies Monitoring Failed - PHP {{ env.PHP_VERSION }}"
5+
labels: ["bug", "dependencies", "wordpress", "monitoring"]
6+
assignees: []
7+
---
8+
9+
## WordPress Dependencies Monitoring Failure
10+
11+
**PHP Version:** {{ env.PHP_VERSION }}
12+
**Workflow Run:** [{{ env.RUN_ID }}]({{ env.WORKFLOW_URL }})
13+
**Date:** {{ date | date('YYYY-MM-DD') }}
14+
15+
### Description
16+
The WordPress dependencies monitoring check has failed during the automated testing process.
17+
18+
### What happened?
19+
The WordPress dependencies monitoring action detected issues with dependencies. This could indicate:
20+
21+
- Outdated WordPress core dependencies
22+
- Incompatible plugin dependencies
23+
- Missing or deprecated WordPress functions being used
24+
- WordPress version compatibility issues
25+
- Plugin dependency conflicts
26+
27+
### Potential Issues
28+
- **WordPress Core Updates:** WordPress core may have been updated with breaking changes
29+
- **Plugin Dependencies:** Dependencies used by the plugin may be outdated or incompatible
30+
- **API Changes:** WordPress APIs used by the plugin may have changed
31+
- **Deprecated Functions:** The plugin may be using deprecated WordPress functions
32+
33+
### Next Steps
34+
1. Review the workflow logs at the link above
35+
2. Check for specific dependency warnings or errors
36+
3. Update WordPress core compatibility if needed
37+
4. Review plugin dependencies for compatibility
38+
5. Update any deprecated WordPress function calls
39+
6. Test with the latest WordPress version
40+
7. Re-run the workflow to verify fixes
41+
42+
### Additional Information
43+
- This monitoring helps ensure WordPress ecosystem compatibility
44+
- Regular dependency monitoring prevents future compatibility issues
45+
- Consider updating minimum WordPress version requirements if needed
46+
47+
---
48+
*This issue was automatically created by the WordPress Dependencies Monitoring workflow failure.*
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: "WordPress Version Compatibility Test Failure"
3+
about: "Automated issue created when WordPress version compatibility tests fail"
4+
title: "WordPress Version Compatibility Test Failed"
5+
labels: ["bug", "compatibility", "wordpress-version"]
6+
assignees: []
7+
---
8+
9+
## WordPress Version Compatibility Test Failed
10+
11+
The WordPress version compatibility test has failed.
12+
13+
**Failure Details:**
14+
- **PHP Version:** {{ env.PHP_VERSION }}
15+
- **WordPress Version:** {{ env.WP_VERSION }}
16+
- **Workflow Run:** [View Details]({{ env.WORKFLOW_URL }})
17+
- **Run ID:** {{ env.RUN_ID }}
18+
19+
**What happened:**
20+
The plugin failed to work correctly with WordPress {{ env.WP_VERSION }} on PHP {{ env.PHP_VERSION }}.
21+
22+
**What needs to be done:**
23+
1. Review the test output in the failed workflow run
24+
2. Identify compatibility issues with WordPress {{ env.WP_VERSION }}
25+
3. Fix any deprecated function calls or API usage
26+
4. Ensure plugin works correctly with this WordPress version
27+
5. Update plugin compatibility metadata if needed
28+
6. Test locally with WordPress {{ env.WP_VERSION }}
29+
30+
**Potential Issues:**
31+
- Deprecated WordPress functions
32+
- Changed WordPress APIs
33+
- PHP version incompatibilities with this WordPress version
34+
- Plugin initialization problems
35+
36+
**Resources:**
37+
- [WordPress Backward Compatibility](https://developer.wordpress.org/plugins/plugin-basics/determining-plugin-and-content-directories/)
38+
- [WordPress Deprecated Functions](https://developer.wordpress.org/reference/functions/)
39+
40+
This issue was automatically created by the CI/CD pipeline.

0 commit comments

Comments
 (0)