Skip to content

Adding support for external commits in referenced events#31

Open
Leo-Send wants to merge 8 commits intose-sic:masterfrom
Leo-Send:master
Open

Adding support for external commits in referenced events#31
Leo-Send wants to merge 8 commits intose-sic:masterfrom
Leo-Send:master

Conversation

@Leo-Send
Copy link

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants