Skip to content
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

Add handling for opening existing pull requests from notifications #2949

Closed
wants to merge 0 commits into from

Conversation

Jonatha1983
Copy link
Contributor

Enhanced notification actions to support detecting and opening existing pull requests directly from the GitHub plugin. If an existing PR is found, the corresponding tab in the tool window is suggested to be opened if it doesn't exist, a suggested notification popup to create a new one same as today. This ensures better alignment of actions with repository context.

@Jonatha1983
Copy link
Contributor Author

@clemairej @iasemenov - I implemented the same in the AZD and it is working pretty well.

I have issues with the Bazel - so can't test it but if you think it is ok I can do the same for the GitLab.

Thanks a lot

@iasemenov iasemenov requested a review from clemairej February 19, 2025 12:05

return listOf(GHPRCreatePullRequestNotificationAction(project, projectMapping, account))
}
?: GitPushNotificationUtil.findRepositoryAndAccount(project.serviceAsync<GHHostedRepositoriesManager>().knownRepositories, repository, remoteBranch.remote, project.serviceAsync<GHAccountManager>().accountsState.value, project.serviceAsync<GithubPullRequestsProjectUISettings>().selectedUrlAndAccount?.second, project.serviceAsync<GithubProjectDefaultAccountHolder>().account)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably best not to include this reformatting, the line becomes a little long

I can change it and commit it if that's okay with you :)

@clemairej
Copy link
Collaborator

Thanks! Looks fine to me :)

@Jonatha1983
Copy link
Contributor Author

@clemairej and @iasemenov would you like me to do the same for GitLab? If so in this PR or opening a new one?

@clemairej
Copy link
Collaborator

@Jonatha1983 If you're feeling motivated, I won't stop you :)
It would definitely be nice to have the same functionality in GitLab!

@Jonatha1983
Copy link
Contributor Author

@clemairej sure - same PR or new one?

@clemairej
Copy link
Collaborator

Oh right sorry. Let's do a new PR. Consider this one merged :)

@Jonatha1983
Copy link
Contributor Author

Jonatha1983 commented Feb 21, 2025

@clemairej oops... I tried to sync my repo and by mistake, it deleted this pr

@Jonatha1983
Copy link
Contributor Author

I ll create a new PR for this with the sync

intellij-monorepo-bot pushed a commit that referenced this pull request Feb 21, 2025
Enhanced notification actions to support detecting and opening existing pull requests directly from the GitHub plugin. If an existing PR is found, the corresponding tab in the tool window is opened instead of prompting to create a new one. This ensures better alignment of actions with repository context.

closes #2949

GitOrigin-RevId: 9ad0b9c09db803d701248659f04de4483d4ca083
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