1. Introduction
In many teams, GitHub Issues, commits, branches, and pull requests are created in the same repository. That is the simple case.
But your setup is more advanced and very common in real companies:
Central task/ticket repo:
devops-school-com/TaskManager
Code repos:
devops-school-com/frontend-repo
devops-school-com/backend-repo
devops-school-com/mobile-repo
Your ticket is maintained here:
devops-school-com/TaskManager#560
Code language: PHP (php)
But the actual code changes may happen in other repositories.
So the goal is:
TaskManager issue #560
↓
linked with branches
↓
linked with commits
↓
linked with pull requests
↓
tracked across multiple repositories
Code language: CSS (css)
GitHub supports this through issue/PR references, closing keywords, commit message references, manual Development sidebar linking, and automation. GitHub automatically converts references to issues, pull requests, and commits into links in GitHub conversations and Markdown areas such as issue bodies, PR bodies, and comments. (GitHub Docs)
2. Important GitHub Concepts
2.1 Issue
An Issue is usually used for a task, bug, feature request, or work item.
Example:
devops-school-com/TaskManager#560
Code language: PHP (php)
In your case, this is the central ticket.
2.2 Commit
A commit is an actual code change.
Example:
git commit -m "Add login validation for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
This message links the commit to the central TaskManager issue.
2.3 Branch
A branch is where a developer works before creating a PR.
Example:
git checkout -b task-560-add-login-validation
Branch names do not automatically close or update issues, but good branch naming helps traceability.
2.4 Pull Request
A Pull Request is the review and merge request for code changes.
Example PR title:
[Task #560] Add login validation
Code language: CSS (css)
Example PR body:
Related to devops-school-com/TaskManager#560
Code language: PHP (php)
or:
Closes devops-school-com/TaskManager#560
Code language: PHP (php)
GitHub can link a PR to an issue manually or by using supported keywords in the PR description. When a linked PR is merged into the default branch, GitHub can automatically close the linked issue. (GitHub Docs)
3. Same-Repository Linking
This is the simplest case.
Assume your issue and code are in the same repository:
Repository:
devops-school-com/backend-repo
Issue:
devops-school-com/backend-repo#25
PR:
devops-school-com/backend-repo#30
Code language: PHP (php)
3.1 Referencing an Issue in a Commit Message
git commit -m "Add payment validation for #25"
Code language: JavaScript (javascript)
This creates a reference to issue #25.
Better commit message:
git commit -m "Add payment validation
Related to #25"
Code language: CSS (css)
3.2 Referencing an Issue in a PR Body
## Task
Related to #25
## What changed?
- Added payment validation
- Updated API response
- Added validation tests
Code language: PHP (php)
This creates a clickable link from the PR to the issue.
3.3 Auto-Closing Same-Repo Issue from PR
Use one of GitHub’s closing keywords:
Closes #25
Code language: CSS (css)
or:
Fixes #25
Code language: CSS (css)
or:
Resolves #25
Code language: CSS (css)
Supported keywords include close, closes, closed, fix, fixes, fixed, resolve, resolves, and resolved. GitHub also supports uppercase and colon variants such as CLOSES: #10. (GitHub Docs)
Example PR body:
## Task
Closes #25
## Summary
- Added payment validation
- Added backend validation test cases
- Updated error message
Code language: PHP (php)
When this PR is merged into the default branch, GitHub will close issue #25. GitHub notes that these special keywords are interpreted only when the PR targets the repository’s default branch. (GitHub Docs)
4. Cross-Repository Linking: Your Real Scenario
Your case:
Central issue repo:
devops-school-com/TaskManager
Issue:
devops-school-com/TaskManager#560
Code repo:
devops-school-com/backend-repo
Code language: PHP (php)
In this case, do not use only:
#560
Code language: CSS (css)
Because #560 inside backend-repo means:
devops-school-com/backend-repo#560
Code language: PHP (php)
That is not your TaskManager issue.
You must use the full cross-repo reference:
devops-school-com/TaskManager#560
Code language: PHP (php)
GitHub supports issue references using Username/Repository#number or Organization/Repository#number. (GitHub Docs)
5. Correct Cross-Repo Commit Message Examples
5.1 Simple Commit Reference
git commit -m "Add login validation for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
5.2 Better Multi-Line Commit Message
git commit -m "Add login validation
Related to devops-school-com/TaskManager#560"
Code language: PHP (php)
5.3 Feature Commit
git commit -m "Implement vehicle search filters for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
5.4 Bug Fix Commit
git commit -m "Fix empty response handling for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
5.5 UI Commit
git commit -m "Update dashboard card layout for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
5.6 API Commit
git commit -m "Add organization task API for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
5.7 Test Commit
git commit -m "Add unit tests for task filtering related to devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
5.8 Documentation Commit
git commit -m "Update setup guide for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
6. Cross-Repo PR Description Examples
6.1 Safe Linking Without Auto-Close
Use this for most PRs:
## Task
Related to devops-school-com/TaskManager#560
## What changed?
- Added backend validation
- Updated API response structure
- Added test coverage
## Testing done
- Ran unit tests
- Tested API manually
Code language: PHP (php)
This creates traceability but does not auto-close the issue.
6.2 Auto-Close Cross-Repo Issue
Use this only when this PR fully completes the task:
## Task
Closes devops-school-com/TaskManager#560
## What changed?
- Completed backend implementation
- Added frontend integration
- Added test coverage
## Testing done
- Verified locally
- Tested staging deployment
Code language: PHP (php)
For issues in a different repository, GitHub’s documented syntax is:
KEYWORD OWNER/REPOSITORY#ISSUE-NUMBER
Code language: PHP (php)
Example:
Fixes octo-org/octo-repo#100
Code language: PHP (php)
For your case:
Fixes devops-school-com/TaskManager#560
Code language: PHP (php)
7. Very Important: Related to vs Closes
This is where many teams get confused.
| Keyword | Meaning | Auto-closes issue? | Best use |
|---|---|---|---|
Related to devops-school-com/TaskManager#560 | Simple link/reference | No | Normal multi-repo work |
Refs devops-school-com/TaskManager#560 | Simple reference | No | Optional style |
Fixes devops-school-com/TaskManager#560 | Final fix | Yes, after merge to default branch | Final PR |
Closes devops-school-com/TaskManager#560 | Final closure | Yes, after merge to default branch | Final PR |
Resolves devops-school-com/TaskManager#560 | Final resolution | Yes, after merge to default branch | Final PR |
For your 4-repo setup, use Related to in most PRs. Use Closes, Fixes, or Resolves only in the PR that truly completes the TaskManager issue.
Example:
frontend-repo PR: Related to devops-school-com/TaskManager#560
backend-repo PR: Related to devops-school-com/TaskManager#560
mobile-repo PR: Closes devops-school-com/TaskManager#560
Code language: PHP (php)
Why? Because if you use Closes in the first PR, GitHub may close the central TaskManager issue too early after that PR is merged.
8. Branch Naming Standard
Branch names are for humans and team discipline. GitHub does not automatically close issues just because of a branch name, but a good branch name makes everything easier.
Recommended format:
task-560-short-description
Examples:
git checkout -b task-560-add-login-validation
git checkout -b task-560-fix-vehicle-filter
git checkout -b task-560-update-dashboard-ui
For larger teams, use repo prefix:
git checkout -b tm-560-backend-login-validation
or:
git checkout -b taskmanager-560-api-filter-fix
9. PR Title Standard
Recommended PR title:
[Task #560] Add login validation
Code language: CSS (css)
Examples:
[Task #560] Add vehicle search filters
Code language: CSS (css)
[Task #560] Fix dashboard loading issue
Code language: CSS (css)
[Task #560] Add backend API for task assignment
Code language: CSS (css)
[Task #560] Update mobile task detail screen
Code language: CSS (css)
The PR title is not enough for GitHub linking. The real link should be in the PR body:
Related to devops-school-com/TaskManager#560
Code language: PHP (php)
10. Manual Linking Using GitHub Development Sidebar
GitHub also allows manual linking.
For your case:
- Open the TaskManager issue.
- Go to:
devops-school-com/TaskManager#560
Code language: PHP (php)
- Find the Development section in the right sidebar.
- Click link/add item.
- Select the code repository.
- Select the PR or branch.
- Click Apply.
GitHub’s docs say that from the issue sidebar, you can manually link a PR or branch, and the issue can be in a different repository than the linked PR or branch. (GitHub Docs)
Important limitation: from the PR sidebar, manual linking is limited to issues in the same repository. From the issue sidebar, cross-repo linking is supported. GitHub’s docs state that PR-sidebar manual linking requires the issue and PR to be in the same repository, while issue-sidebar linking supports a different repository. (GitHub Docs)
11. Why You Cannot See All Commit Messages in the TaskManager Issue Timeline
This was your exact problem.
You linked the PR/branch from:
TaskManager issue #560 → Development sidebar
Code language: CSS (css)
But you still could not see all commit messages inside the issue timeline.
That is normal.
Manual Development linking shows that work is connected to the issue. It does not automatically copy every commit message from the PR into the issue timeline. GitHub is more PR-centric than commit-list-centric.
Also, GitHub says that if closing keywords are used in a commit message, the issue can be closed when that commit is merged into the default branch, but the PR containing that commit will not be listed as a linked PR. (GitHub Docs)
So, the best native GitHub flow is:
TaskManager issue
↓
Linked PR visible in Development
↓
Open PR
↓
Go to Commits tab
↓
See commit messages
If you want commit messages directly inside the TaskManager issue, you need automation.
12. Recommended Workflow for Your Team
For each TaskManager issue:
devops-school-com/TaskManager#560
Code language: PHP (php)
Step 1: Create branch in code repo
git checkout -b task-560-add-login-validation
Step 2: Add commits with issue reference
git commit -m "Add login validation for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
git commit -m "Add login validation tests for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
git commit -m "Fix validation error message for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
Step 3: Create PR with proper title
[Task #560] Add login validation
Code language: CSS (css)
Step 4: Add PR body
## Task
Related to devops-school-com/TaskManager#560
## What changed?
- Added login validation
- Added validation test cases
- Updated error response
## Testing done
- Ran unit tests
- Tested login flow locally
## Notes
This PR is part of TaskManager issue #560.
Code language: PHP (php)
Step 5: Link PR manually from TaskManager issue
Go to:
TaskManager issue #560 → Development → select repo → select PR → Apply
Code language: CSS (css)
Step 6: Use closing keyword only in final PR
Closes devops-school-com/TaskManager#560
Code language: PHP (php)
13. Same Issue, Multiple Repositories Example
Assume issue:
devops-school-com/TaskManager#560
Code language: PHP (php)
You need changes in 3 repos:
frontend-web
backend-api
mobile-app
Backend PR
## Task
Related to devops-school-com/TaskManager#560
## What changed?
- Added API endpoint
- Added request validation
- Added DB migration
Code language: PHP (php)
Frontend PR
## Task
Related to devops-school-com/TaskManager#560
## What changed?
- Added task form UI
- Integrated backend API
- Added error handling
Code language: PHP (php)
Mobile PR
## Task
Closes devops-school-com/TaskManager#560
## What changed?
- Added mobile task screen
- Integrated API
- Completed final user flow
Code language: PHP (php)
This gives you clean tracking without closing the issue too early.
14. Multiple Issues in One PR
Sometimes one PR completes multiple issues.
Same repo example:
Resolves #10, resolves #11, resolves #12
Code language: CSS (css)
Cross-repo example:
Resolves devops-school-com/TaskManager#560, resolves devops-school-com/TaskManager#561
Code language: PHP (php)
Mixed example:
Resolves #10, resolves devops-school-com/TaskManager#560
Code language: PHP (php)
GitHub documents that multiple issues should use full syntax for each issue reference. (GitHub Docs)
15. One Issue, Multiple PRs
This is your most common case.
Use Related to everywhere:
Related to devops-school-com/TaskManager#560
Code language: PHP (php)
Use Closes only once, in the final PR:
Closes devops-school-com/TaskManager#560
Code language: PHP (php)
Recommended pattern:
| Repo | PR Body |
|---|---|
| backend-api | Related to devops-school-com/TaskManager#560 |
| frontend-web | Related to devops-school-com/TaskManager#560 |
| mobile-app | Related to devops-school-com/TaskManager#560 |
| final integration PR | Closes devops-school-com/TaskManager#560 |
16. Commit Message Best Practices
16.1 Good Commit Message
git commit -m "Add task assignment API for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
16.2 Better Commit Message
git commit -m "Add task assignment API
Related to devops-school-com/TaskManager#560"
Code language: PHP (php)
16.3 Best Multi-Line Commit Message
git commit -m "Add task assignment API
- Added task assignment endpoint
- Added request validation
- Added service layer method
- Added unit tests
Related to devops-school-com/TaskManager#560"
Code language: PHP (php)
16.4 Commit Message for Bug Fix
git commit -m "Fix task status filter bug
The completed task filter was not applying organization scope.
Related to devops-school-com/TaskManager#560"
Code language: PHP (php)
16.5 Commit Message for Final Fix
Use carefully:
git commit -m "Fix task assignment workflow
Closes devops-school-com/TaskManager#560"
Code language: PHP (php)
GitHub allows closing keywords in commit messages, but the cleaner workflow is usually to put the closing keyword in the PR body, because PRs are easier to review and audit. GitHub also notes that when a commit message closes an issue, the PR containing that commit will not be listed as the linked PR. (GitHub Docs)
17. PR Template for Same-Repo and Cross-Repo Work
Add this file in each code repo:
.github/pull_request_template.md
Template:
## Task Link
<!-- Same repo example: Related to #123 -->
<!-- Cross repo example: Related to devops-school-com/TaskManager#560 -->
Related to devops-school-com/TaskManager#ISSUE_ID
## What changed?
-
## Testing done
-
## Screenshots / Logs
-
## Deployment notes
-
## Final PR?
- [ ] This PR is the final PR for the task
- [ ] If final, replace `Related to` with `Closes`
Code language: HTML, XML (xml)
For your specific task:
## Task Link
Related to devops-school-com/TaskManager#560
## What changed?
-
## Testing done
-
## Screenshots / Logs
-
## Deployment notes
-
## Final PR?
- [ ] This PR is the final PR for TaskManager issue #560
Code language: PHP (php)
18. Issue Template for TaskManager Repo
In the central TaskManager repo, create:
.github/ISSUE_TEMPLATE/task.yml
Or use a simple Markdown issue template:
## Task Summary
Describe the task.
## Repositories Involved
- [ ] frontend-web
- [ ] backend-api
- [ ] mobile-app
- [ ] other
## Expected PRs
- frontend-web:
- backend-api:
- mobile-app:
## Acceptance Criteria
- [ ]
- [ ]
- [ ]
## Linked PRs
-
## Final Closure Rule
Only the final PR should use:
Closes devops-school-com/TaskManager#ISSUE_ID
Code language: PHP (php)
For issue #560, the issue body can maintain a manual list:
## Linked PRs
- backend-api: devops-school-com/backend-api#45
- frontend-web: devops-school-com/frontend-web#88
- mobile-app: devops-school-com/mobile-app#19
Code language: PHP (php)
This is very useful because GitHub’s native UI may not give you a perfect central commit list.
19. How to See Work from the TaskManager Issue
Inside TaskManager#560, you may see:
Development
- backend-api#45
- frontend-web#88
- mobile-app#19
Code language: CSS (css)
To view commits:
- Click the linked PR.
- Open the Commits tab.
- Review all commit messages.
- Open Files changed for code review.
- Return to TaskManager issue for final status.
This is the most natural GitHub-native workflow.
20. If You Want Commit Messages Directly Inside the TaskManager Issue
GitHub does not provide a perfect native “show all commits from linked PRs inside central issue timeline” view.
So use GitHub Actions.
The idea:
Developer creates PR in backend-api
↓
GitHub Action extracts TaskManager issue ID from PR body
↓
Action collects PR commits
↓
Action comments on devops-school-com/TaskManager#560
Code language: PHP (php)
GitHub CLI supports adding comments to issues with gh issue comment, including selecting another repository with --repo OWNER/REPO. (GitHub CLI)
GitHub REST API can also create and manage comments on issues and pull requests. (GitHub Docs)
21. GitHub Action Example: Comment Commit Summary on TaskManager Issue
Add this workflow in each code repo:
.github/workflows/comment-taskmanager-issue.yml
name: Comment TaskManager Issue with PR Commit Summary
on:
pull_request:
types: [opened, synchronize, reopened, closed]
jobs:
comment-taskmanager:
runs-on: ubuntu-latest
steps:
- name: Extract TaskManager issue ID from PR body
id: extract
shell: bash
run: |
PR_BODY="${{ github.event.pull_request.body }}"
ISSUE_ID=$(echo "$PR_BODY" | grep -oE 'devops-school-com/TaskManager#[0-9]+' | head -1 | grep -oE '[0-9]+')
if [ -z "$ISSUE_ID" ]; then
echo "No TaskManager issue found in PR body."
echo "found=false" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "found=true" >> "$GITHUB_OUTPUT"
echo "issue_id=$ISSUE_ID" >> "$GITHUB_OUTPUT"
- name: Checkout code
if: steps.extract.outputs.found == 'true'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build commit summary
if: steps.extract.outputs.found == 'true'
id: commits
shell: bash
run: |
PR_NUMBER="${{ github.event.pull_request.number }}"
PR_TITLE="${{ github.event.pull_request.title }}"
PR_URL="${{ github.event.pull_request.html_url }}"
REPO="${{ github.repository }}"
ISSUE_ID="${{ steps.extract.outputs.issue_id }}"
echo "## Code update from ${REPO}#${PR_NUMBER}" > comment.md
echo "" >> comment.md
echo "**PR:** ${PR_TITLE}" >> comment.md
echo "**PR URL:** ${PR_URL}" >> comment.md
echo "**Status:** ${{ github.event.action }}" >> comment.md
echo "" >> comment.md
echo "### Commits" >> comment.md
gh pr view "$PR_NUMBER" \
--repo "$REPO" \
--json commits \
--jq '.commits[] | "- `" + .oid[0:7] + "` " + .messageHeadline' >> comment.md
- name: Comment on TaskManager issue
if: steps.extract.outputs.found == 'true'
run: |
gh issue comment "${{ steps.extract.outputs.issue_id }}" \
--repo devops-school-com/TaskManager \
--body-file comment.md
env:
GH_TOKEN: ${{ secrets.TASKMANAGER_TOKEN }}
Code language: PHP (php)
Important: for cross-repo commenting, use a token that has permission to write comments in devops-school-com/TaskManager. GitHub recommends using minimum required permissions for GITHUB_TOKEN, and when a workflow needs permissions not available through GITHUB_TOKEN, you can use a GitHub App token or a personal access token stored as a repository secret. (GitHub Docs)
Create a secret in each code repo:
TASKMANAGER_TOKEN
That token should have permission to comment on issues in:
devops-school-com/TaskManager
22. Recommended Final Team Standard
Use this as your official rule.
Branch
task-560-short-description
Example:
task-560-add-login-validation
Commit Message
git commit -m "Add login validation for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
PR Title
[Task #560] Add login validation
Code language: CSS (css)
PR Body
## Task
Related to devops-school-com/TaskManager#560
## What changed?
-
## Testing done
-
Code language: PHP (php)
Final PR Body
Only when the task is fully completed:
Closes devops-school-com/TaskManager#560
Code language: PHP (php)
Manual Linking
From the central issue:
TaskManager issue #560 → Development → Link PR/branch
Code language: PHP (php)
Optional Automation
Use GitHub Actions to comment PR commit summaries into the TaskManager issue.
23. Common Mistakes and Fixes
| Mistake | Problem | Correct approach |
|---|---|---|
Using #560 in another repo | Links to issue/PR #560 in the current repo, not TaskManager | Use devops-school-com/TaskManager#560 |
Using Closes in every PR | First merged PR may close the central issue too early | Use Related to until final PR |
| Expecting commit messages inside TaskManager issue timeline | GitHub does not show all linked PR commits directly in central issue timeline | Open linked PR → Commits tab, or use GitHub Action |
| Adding issue ID only in branch name | Branch name alone is not enough for strong tracking | Add issue reference in PR body and commits |
| Linking PR from PR sidebar for cross-repo issue | PR sidebar manual linking works for same repo only | Use TaskManager issue sidebar → Development |
| Using closing keyword on non-default target branch | GitHub may ignore the closing keyword | Target default branch for auto-close |
| Putting issue ID only in PR title | Title is useful but not enough | Put full reference in PR body |
| Using commit closing keyword only | Issue may close, but PR may not appear as linked PR | Prefer closing keyword in PR body |
24. Complete End-to-End Example for Your Case
Issue:
devops-school-com/TaskManager#560
Code language: PHP (php)
Code repo:
devops-school-com/backend-api
Create branch
git checkout -b task-560-add-login-validation
Make commits
git add .
git commit -m "Add login validation for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
git add .
git commit -m "Add login validation tests for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
git add .
git commit -m "Fix validation response format for devops-school-com/TaskManager#560"
Code language: JavaScript (javascript)
Push branch
git push origin task-560-add-login-validation
Create PR
PR title:
[Task #560] Add login validation
Code language: CSS (css)
PR body:
## Task
Related to devops-school-com/TaskManager#560
## What changed?
- Added login validation
- Added validation test cases
- Fixed response format
## Testing done
- Ran unit tests
- Tested login API locally
## Notes
This is part of the central TaskManager issue.
Code language: PHP (php)
If this is final PR
Change:
Related to devops-school-com/TaskManager#560
Code language: PHP (php)
to:
Closes devops-school-com/TaskManager#560
Code language: PHP (php)
Manual link
Open:
devops-school-com/TaskManager#560
Code language: PHP (php)
Then:
Development → Link PR/branch → select backend-api PR → Apply
View commits
Inside the TaskManager issue, click the linked PR. Then open the PR’s Commits tab.
25. Final Recommendation
For your setup, the best practical standard is:
Central issues:
devops-school-com/TaskManager
Code changes:
Other repos
Every branch:
task-ISSUE_ID-short-description
Every commit:
Message + devops-school-com/TaskManager#ISSUE_ID
Every PR:
[Task #ISSUE_ID] Title
Every PR body:
Related to devops-school-com/TaskManager#ISSUE_ID
Only final PR:
Closes devops-school-com/TaskManager#ISSUE_ID
For visible commit summaries inside TaskManager:
Use GitHub Actions automation
Code language: PHP (php)
This gives you the cleanest traceability:
TaskManager issue
→ linked PRs
→ PR commits
→ code changes
→ final closure
Code language: PHP (php)
For your specific issue, always use:
devops-school-com/TaskManager#560
Code language: PHP (php)I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at WIZBRAND
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals