Xcode 13 beta -- how to see/work with PRs and comments?

The Xcode 13 part of the SOTU video and the https://developer.apple.com/xcode/ page mention "Team Comments" -- this seems really cool. But... how do you get the comments? And can you ADD or EDIT comments within Xcode? Or just see them?

I've tried with a github repo and a bitbucket one but don't see those.

Thanks!

Replies

Hey there,

Xcode 13's Pull Request integration is designed with collaboration in mind. It does this by determining the pull request associated with your current checkout, presenting you with meaningful information.

Xcode determines the associated pull request by looking at your current checkout's upstream branch, and checking to see if there's an open pull request associated with that branch. In most cases you'd have origin configured and some branch such as dev/toolbar_fix. Xcode will query the host for the remote (say github.com) and ask if there's any pull requests currently open whose source branch is dev/toolbar_fix. If it finds an open pull request, it will load it into Xcode. Once you browse around files in this context, Xcode will automatically find comments associated with those files. The changes navigator will display which files have comments on them, too.

Note, this can only work if you've added your GitHub account to Xcode in the accounts pane of Xcode's preferences.

You can find out more in tomorrow's session "Review code and collaborate in Xcode" https://developer.apple.com/videos/play/wwdc2021/10205/

Hope that helps

  • Thank you for the clarification — that’s very helpful.

    Does it work with Bitbucket or Gitlab as well?

  • We'll be adding pull request support for Bitbucket and GitLab in future releases (likely a point release). Today it works for GitHub, GitHub Enterprise, and Bitbucket Server.

  • Hopeful for GitLab support here.

Everything is perfect... almost. In WWDC2021 Video When you click on View Changes in you Changes navigator, you're pointed to the file that was changed and we can see an inline comments. Can someone provide a hint to enable those? Right now I can't see it.

16GB MPB M1, Big Sur 11.6, Xcode 13 (13A233), BitBucket Server

  • It seems that it's repo host dependent. On my private github.com repo it works flawlessly. On my company's BitBucket Server it doesn't. Can you @kieran_dt shed some light, if possible, why it doesn't work and what to do to make it work or some roadmap for the solution?

    Thanks!

  • We have the same issue of not seeing inline comments when using Bitbucket Server, any updates regarding this @kieran_dt or @gutaker?

Add a Comment

Ok nice I can see comments of my PR in my Xcode. That's cool but can I toggle off those comments? ...without removing my Github account?

  • Great question. This is definitely one of those features I can't imagine anyone wanting. And the toggle button sometimes does not work. Is there a way to remove the feature all together? It is seriously one of the biggest time wasters/distractions to my work. XCode continues to harbor one of the worst reputations as an IDE in the engineering world :/

Add a Comment