Adding support for external commits in referenced events#31
Open
Leo-Send wants to merge 8 commits intose-sic:masterfrom
Open
Adding support for external commits in referenced events#31Leo-Send wants to merge 8 commits intose-sic:masterfrom
referenced events#31Leo-Send wants to merge 8 commits intose-sic:masterfrom
Conversation
bockthom
reviewed
Jul 21, 2025
bockthom
reviewed
Aug 11, 2025
bockthom
approved these changes
Sep 8, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for external commits in referenced events, allowing commits from external repositories that mention issues to be properly tracked. It also fixes a bug where hashtags in markdown code blocks were incorrectly interpreted as issue/PR references.
Key changes:
- External commits now receive a distinct type (
commitReferencesIssueExternal) to differentiate them from internal repository commits - Markdown code blocks (delimited by triple backticks) are now excluded when parsing hashtag references
- Enhanced error handling and logging for commit retrieval failures
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| IssueDataProcessor.java | Added logic to differentiate external commits and filter out hashtags within markdown code blocks |
| GitHubRepository.java | Implemented new method to fetch commits via URL for external references with improved error logging |
| GitHubCommit.java | Added isExternal field and accessor methods to track external commit status |
| EventDataProcessor.java | Enhanced commit retrieval to fallback to URL-based fetching for external commits |
| README.md | Added documentation explaining referenced events behavior and known limitations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
external commits that reference an issue can now be fetched. They will be marked with 'commitReferencesIssueExternal'. To that end, this commit adds an 'external' field to each commit and a new method to extract commits using the full url instead of just the relative one within the repo. Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
references to issues are now only found if they are ouside a code environment (starting and ending with three '`'). This mirrors GitHubs behaviour. Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Add paragraph that documents intended and unintended behaviour for 'referenced' events Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
reformat README and nested if statement Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
change BE words for consistency Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
Getter previously did not use method parameter. Also renamed and added docs to match existing methods. Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
using stringbuilder instead of appending, which would result in copying the string Signed-off-by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
External commits that mention issues in the project can now be fetched. They receive a new type of related commit, called
commitReferencesIssueExternal. Also fixed hashatags in markdown code environments incorrectly registering as references to other issues/PRs.