How Linear attaches a pull request
The GitHub integration of Linear attaches a pull request to an issue when the issue ID, for examplePLAT-142, is in the branch name or the title of the pull request. In the description, write a magic word before the issue ID, for example Fixes PLAT-142. Turn on the GitHub integration in your Linear workspace, so that Linear can see your pull requests. See GitHub integration in the Linear documentation.
You can also attach a pull request to an issue by hand in Linear. Agent Golf reads it the same way.
The rules that Agent Golf uses
- Agent Golf reads only the GitHub attachments of an issue. It ignores other attachments.
- The attachment URL must be a pull-request URL:
https://github.com/<owner>/<repository>/pull/<number>. Agent Golf ignores the rest of the path, the query, and the fragment after the number. A commit URL or a GitHub issue URL makes no link. - Agent Golf matches the repository name without regard to case.
- One issue can link several pull requests, and one pull request can link several issues.
- Two attachments of one issue that name the same pull request make one link.
- When you remove the attachment in Linear, Agent Golf removes the link. When you change the attachment to another pull request, the link moves to that pull request.
Repositories
Agent Golf finds the pull request of a link in the GitHub organizations that the workspaces of your organization connected. When it finds the repository, it keeps the GitHub ID of the repository with the link, so a later rename of the repository keeps the link. A link can name a pull request that Agent Golf does not have, for example in a repository that the Agent Golf GitHub App does not cover. Such a link adds no spend. When Agent Golf did not find the repository, the link matches the pull request by the repository name, so a rename of the repository breaks it.How a link carries spend
A linked pull request counts for its issue and for each issue, project, and initiative above it, each once. A milestone counts the pull requests that link directly to its issues. See How Spend Counts. A pull request with no link to an issue in a project or an initiative is unplanned. See Unplanned spend.Where you see the links
- The Linear Issues card of a pull request lists the issues that the pull request links to, with their projects and initiatives.
- The Linear Issues card of a session lists the issues that the pull requests of the session link to.
- The Pull Requests tab of a project lists its linked pull requests.
- The issue details on the roadmap list the pull requests and the sessions of an issue.