Add handling for opening existing pull requests and merge request from notifications #2954
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.
Introduce actions for opening existing pull/merge requests directly in the respective tool windows. This improves usability by allowing users to interact with existing requests if detected, avoiding duplicate creation workflows.
This pull request introduces several new features and improvements to the GitHub and GitLab plugins, focusing on enhanced notification actions for pull and merge requests. The key changes include adding actions for opening existing pull requests and merge requests, as well as improving code readability and maintainability.
GitHub Plugin Changes:
Notification Actions:
GHOpenPullRequestExistingTabNotificationAction
to open existing pull requests in a new tab if one exists. [1] [2]GHPushNotificationCustomizer
to check for existing pull requests and provide appropriate actions based on the number of existing pull requests.Code Improvements:
canCreateReview
andfindExistingPullRequests
methods by adding comments and restructuring the code.GitLab Plugin Changes:
Notification Actions:
GitLabOpenMergeRequestExistingTabNotificationAction
to open existing merge requests in a new tab if one exists.GitLabPushNotificationCustomizer
to check for existing merge requests and provide appropriate actions based on the number of existing merge requests.Code Improvements:
canCreateReview
andfindExistingMergeRequests
methods by adding comments and restructuring the code.Additional Changes:
GithubBundle.properties
andGitLabBundle.properties
files. [1] [2]These changes enhance the user experience by providing more intuitive actions for handling existing pull and merge requests, while also improving the maintainability of the codebase.