Commit 672dd4d
feat: improve Danger testing and flavor recognition (#105)
* feat: enhance Danger with inline changelog suggestions
- Implement inline changelog suggestions instead of generic instructions
- Add unified flavor configuration with grouped labels
- Extract testable functions into dangerfile-utils.js module
- Add comprehensive test suite with 21 test cases
- Integrate JavaScript testing into CI workflow
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Potential fix for code scanning alert no. 22: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: download dangerfile-utils.js in danger workflow
The dangerfile now requires the utils module, so both files need to be downloaded.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: consolidate skip-changelog flavors into single config
Merge all internal change flavors (docs, style, refactor, test, build, ci, chore, deps)
into one configuration entry since they all have the same behavior (skip changelog).
This reduces the config from 7 separate entries to 1, making it more maintainable.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: simplify dangerfile to focus on testing and flavor improvements
Remove inline suggestions functionality to focus this PR on:
- Improved flavor recognition and configuration
- Testing infrastructure additions
- Consolidating skip-changelog flavors
The inline suggestions feature will be implemented in a separate PR.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: update flavor config based on real Sentry usage analysis
Based on analysis of 60 recent PRs from top Sentry repositories:
**Key findings:**
- 'ref' is very common (14 occurrences) but missing from our config
- 'tests' is used (5 occurrences) and should skip changelog
- 'meta' is used for repository maintenance
- 'Bug Fixes' is more standard than 'Fixes' for changelog sections
**Changes made:**
- Add 'ref' flavor mapping to 'Changes' section
- Add 'meta' and 'tests' to skip-changelog group
- Change 'Fixes' to 'Bug Fixes' (aligns with sentry-javascript)
- Update tests and documentation
This makes our configuration reflect actual usage patterns in Sentry repositories.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: improve Danger testing and conventional commit scope handling
- Add comprehensive testing infrastructure with 23 test cases
- Fix scope handling for conventional commits (feat(core): -> feat)
- Properly classify ref commits as internal changes
- Add modular architecture with testable functions
- Include CI integration for JavaScript testing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: remove unused findChangelogInsertionPoint function and its tests
* refactor: remove unrelated function and add input validation
- Remove findChangelogInsertionPoint function (unrelated to flavor recognition)
- Add type validation to extractPRFlavor to prevent runtime errors
- Add comprehensive tests for input validation
- Reduce test count from 23 to 18 focused tests
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* security: replace ReDoS-vulnerable regex with safe string parsing
- Replace regex `/\([^)]*\)/` with indexOf/substring approach
- Prevents potential ReDoS attacks with nested parentheses
- Improves performance and readability
- Add comprehensive edge case tests for malformed scope inputs
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: enhance flavor configuration and add tests for non-conventional PR titles
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>1 parent 06ba389 commit 672dd4d
File tree
6 files changed
+414
-22
lines changed- .github/workflows
- danger
6 files changed
+414
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
0 commit comments