Search
K
Links

Code

Overview

If you're using Flat with a software team, Flat has a powerful integration with GitHub to automatically link pull requests with topics.
When a pull request is linked to a topic, you'll get several benefits to streamline your team's collaboration:
  • Real-time PR status: Open PRs are displayed right in the workspace on the topic's card, including their title, live build status, deploy preview and other CI/CD links, review requests, merge conflict status, and more, making it easy for you and your team to stay on top of development activity and jump in when a PR needs attention.
  • Easier, more timely code reviews: Flat helps teams stay on top of code reviews by displaying pending reviews right in the workspace on the topic's card, as well as in the reviewer's "My threads" view. Also, Flat posts a comment on the PR in GitHub with the topic's details. That makes it easier for code reviewers to know what a PR is for without having to navigate back to Flat.
  • Knowledge retention: Merged PRs are permanently retained in the linked topic's details. Not sure how a topic was implemented? Open the topic in Flat and the PRs are all right there. Not sure why some old code was written? Open the PR in GitHub and follow the link left by Flat to get back to the topic.
Learn more about the GitHub integration:

Step-by-step

Linking a pull request to a topic

To link a pull request with a topic, just ensure the pull request's head branch name contains the topic ID in a recognized format. When you open the pull request, Flat will automatically link it to the topic.
Flat generates a suggested branch name for each topic using the topic's ID and title. You can grab this suggested branch name while on the topic's page or while in the workspace:
  • While on the topic's page: Scroll down to the Code section and click the copy button next to the suggested branch name.
  • While in the workspace: Hover over the topic's card and click the ellipsis menu, then choose Copy branch name.
The suggested branch name is just that, a suggestion. You can also use your own branch name as long as it contains the topic's ID in a recognizable way. For example, for topic ID #123, the branch name could use these patterns:
  • 123
  • 123-foo-bar
  • 123_foo_bar
  • baz/123-foo-bar
Need a different branch name pattern? Contact us.
To view the pull requests associated with a topic, visit the topic's page and scroll down to the Code section. You'll see both open and merged pull requests linked to the topic. Click any pull request to open it in GitHub.
In addition, when you view a workspace, open pull requests are shown on the associated topic's card, giving you and your team better visibility and quicker access.
When Flat links a pull request to a topic, it posts a comment on the pull request in GitHub with the topic's title, description, and other details, along with a link back to the topic in Flat. This makes it easy for code reviewers to know the context of the pull request without having to open the topic, and makes it easy for anyone to navigate to the topic if they need to.