-
Notifications
You must be signed in to change notification settings - Fork 2
Add functionality for new events #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I have a few open questions/issues regarding this PR:
Edit: |
|
Quick update regarding connected events: |
|
Good idea! I agree, it does not fit into the GitHubWrapper. So, just store it in the json file and we will find the related issue later. (1) We do all the other processing in codeface-extraction. Why should we leave this one post-processing step to coronet? Would be inconsistent, I guess. So, I'd suggest to compute the connected issue in codeface-extraction. |
|
This PR is ready for review, but should be merged after PR #31 is merged. |
There was a problem hiding this 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 handling new GitHub event types related to issue management, specifically: issue type changes, state changes (reopened), parent/sub-issue relationships, and connected events. The changes enhance the existing GitHub API wrapper to capture and process these additional event types.
Key changes include:
- New data models for issue types (
TypeData) and state reasons (StateReason) - Support for tracking sub-issues and external commits
- Enhanced event processing for the newly supported event types
- Improved commit hash extraction by filtering out code blocks
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
TypeData.java |
New data model for issue type information from GitHub's API |
StateReason.java |
New enum for issue/PR state reasons (completed, reopened, not_planned, duplicate) |
IssueDataProcessor.java |
Added sub-issue parsing, external commit tracking, and code block filtering in hash extraction |
IssueData.java |
Added type field and sub-issues list to issue data model |
GitHubRepository.java |
Added external commit URL fetching and registered new event processors |
GitHubCommit.java |
Added external commit tracking flag |
EventDataProcessor.java |
Added processors for state change, issue type change, and connected events |
EventData.java |
Added new event data classes for state changes, issue type changes, parent/sub-issue changes, and connected events |
README.md |
Added documentation about referenced events and data processing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I am satisfied with the changes in this PR. However, we also need to satisfy Copilot in this and the previous PR. |
|
And please add you copyright header to StateReason.java, since you have modified it yourself now. |
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 <[email protected]>
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 <[email protected]>
Add paragraph that documents intended and unintended behaviour for 'referenced' events Signed-off-by: Leo Sendelbach <[email protected]>
reformat README and nested if statement Signed-off-by: Leo Sendelbach <[email protected]>
change BE words for consistency Signed-off-by: Leo Sendelbach <[email protected]>
Signed-off-by: Leo Sendelbach <[email protected]>
Getter previously did not use method parameter. Also renamed and added docs to match existing methods. Signed-off-by: Leo Sendelbach <[email protected]>
using stringbuilder instead of appending, which would result in copying the string Signed-off-by: Leo Sendelbach <[email protected]>
introduce new state reason and type data classes Signed-off-by: Shiraz Jafri <[email protected]>
Add new event data subclass for state changed events Signed-off-by: Shiraz Jafri <[email protected]>
Add new enum and eventdata subclasses to track changes in issue types Signed-off-by: Shiraz Jafri <[email protected]>
no longer serializing change_type field in IssueTypeChangedEventData Signed-off-by: Shiraz Jafri <[email protected]>
Introduce new subclasses for parent and subissue events Signed-off-by: Shiraz jarfi <[email protected]>
Introduce new event data subclass for connected events Signed-off-by: Shiraz Jafri <[email protected]>
key was duplicated with different values, overwriting previous entry Signed-off-by: Leo Sendelbach <[email protected]>
also add event ids and subissue numbers to data SHA-1 extraction now only recognises hexadecimal strings length 7 and above (previously 5) Issue and Event data are extended by simple fields to hold event ids and subissue numbers Signed-off-by: Leo Sendelbach <[email protected]>
also fix copyright headers in new files Signed-off-by: Leo Sendelbach
Parernt- and Subissues can not have a 'changed' event None and Any state reasons were not achievable Also removed the state reason field from issue data StateChangedEvents can now have a commit (issues can be closed by a commit) Signed-off-by: Leo Sendelbach <[email protected]>
instead of assigning completed as default case, now throw an error. If new state reasons are added later on githubs side, the occurence of this error should prevent us from not noticing that change. Signed-off-by: Leo Sendelbach <[email protected]>
suggestions contain a codeblock using the suggestion keyword after opening the block. Add a field to reviewCommentData and result json for this boolean Signed-off-by: Leo Sendelbach <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Comments suppressed due to low confidence (2)
src/de/uni_passau/fim/gitwrapper/EventDataProcessor.java:1
- The inner class
StateChangedEventDatais declared aspublic classinsideEventData.java, but should be declared aspublic static classto match the pattern of other inner event classes likeReferencedEventDataandLabeledEventDatain the same file.
/**
src/de/uni_passau/fim/gitwrapper/IssueDataProcessor.java:431
- Variable 'String stateReasonValue' is never read.
String stateReasonValue = (stateReasonElement != null && !stateReasonElement.isJsonNull())
? stateReasonElement.getAsString()
: null;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes: - case sensitive check for suggestion - minor spelling issue - artifact from state reasons in issue data - debug comment - copyright headers Signed-off-by: Leo Sendelbach <[email protected]>
Adds functionality for the following events: