You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of the following, dangerfile could suggest specific update to the changelog, including the target file & line - that way, users can just apply the suggestion instead of manually going to the file.
Fails
🚫
Please consider adding a changelog entry for the next release.
Instructions and example for changelog
Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.
Example:
## Unreleased- hide `StackTraceMode` from options to avoid accidental errors when used with IL2CPP ([#1033](https://github.com/getsentry/sentry-unity/pull/1033))
If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.
Generated by 🚫 dangerJS against 63c011c31dc0cb8fb87ffa324959ffef0b5938ef
Closing this issue after thorough investigation and implementation attempt revealed fundamental GitHub API limitations that make inline suggestions impractical.
What We Tried
Implemented a complete solution that:
✅ Parsed changelog structure to find exact insertion points
✅ Used GitHub PR review comments API for inline suggestions
✅ Had comprehensive error handling and fallbacks
✅ Included 43 passing tests covering all edge cases
Fundamental Limitations Discovered
1. GitHub API Constraint: Files Must Be in PR Diff
The GitHub PR review comments API can only create suggestions on files that are part of the PR's changed files.
Problem: Most PRs don't modify CHANGELOG.md, so suggestions cannot be created. Reality: Feature would only work when changelog is already being modified (rare edge case). Result: Falls back to existing markdown instructions in 99% of cases.
2. Permission Requirements
GitHub API calls for review comments require elevated permissions:
Default GITHUB_TOKEN insufficient for review comment creation
403: Resource not accessible by integration errors
Would need special token configuration
Impact Analysis
Current behavior: Always shows markdown instructions ✅ (works 100% of time) Proposed behavior: Show inline suggestions ❌ (works <1% of time due to API constraints)
Since the vast majority of PRs don't touch the changelog, this enhancement would provide almost no practical benefit while adding complexity and potential failure points.
Conclusion
The existing markdown instructions approach is actually the optimal solution given GitHub's API constraints. It works reliably across all scenarios without requiring special permissions or file modifications.
Sometimes the simple solution is the right solution!
Closing as not feasible due to GitHub API limitations.
Activity
feat: enhance Danger with inline changelog suggestions
feat: Danger - Add inline changelog suggestions for GitHub PRs
docs: Add changelog entry for inline suggestions feature
vaind commentedon Sep 19, 2025
Closing this issue after thorough investigation and implementation attempt revealed fundamental GitHub API limitations that make inline suggestions impractical.
What We Tried
Implemented a complete solution that:
Fundamental Limitations Discovered
1. GitHub API Constraint: Files Must Be in PR Diff
The GitHub PR review comments API can only create suggestions on files that are part of the PR's changed files.
Problem: Most PRs don't modify
CHANGELOG.md, so suggestions cannot be created.Reality: Feature would only work when changelog is already being modified (rare edge case).
Result: Falls back to existing markdown instructions in 99% of cases.
2. Permission Requirements
GitHub API calls for review comments require elevated permissions:
GITHUB_TOKENinsufficient for review comment creation403: Resource not accessible by integrationerrorsImpact Analysis
Current behavior: Always shows markdown instructions ✅ (works 100% of time)
Proposed behavior: Show inline suggestions ❌ (works <1% of time due to API constraints)
Since the vast majority of PRs don't touch the changelog, this enhancement would provide almost no practical benefit while adding complexity and potential failure points.
Conclusion
The existing markdown instructions approach is actually the optimal solution given GitHub's API constraints. It works reliably across all scenarios without requiring special permissions or file modifications.
Sometimes the simple solution is the right solution!
Closing as not feasible due to GitHub API limitations.