Our GitHub workflow provides a structured approach to handling issues, implementing changes, and managing pull requests. This guide walks you through the complete process from issue to deployment.
The GitHub workflow consists of five main phases:
- Retrieve Issue Details - Understand what needs to be done
- Plan and Analysis - Determine the best approach
- Implementation - Build the solution
- Validation - Ensure quality and correctness
- Pull Request - Submit your work for review
Start by gathering all relevant information about the issue:
# View a specific issue
gh issue view ISSUE_NUMBER
# Batch view multiple issues
gh issue list --limit 50 --json number,title,state,labels,assignees,updatedAt,body --jq '.[] | select(.number == 123 or .number == 456 or .number == 789)'
# Filter by criteria
gh issue list --label "bug" --state "open" --json number,title,body,labels --jq '.[]'
gh issue list --assignee "@me" --json number,title,body,state --jq '.[]'- Issue description - What exactly needs to be done?
- Labels and priority - How urgent is this?
- Comments and discussion - What has already been discussed?
- Related issues - Are there dependencies or related work?
- Reproduction steps - For bugs, how can you reproduce the issue?
- Always provide clickable GitHub URLs when referencing issues or PRs
- Clone reproduction repositories under
./tmp/repros/ISSUE_NUMBERif needed - Read all comments - important context might be in the discussion
Before implementing, ensure you understand:
- What is the current behavior? - How does the system work now?
- What should the expected behavior be? - What needs to change?
- What are the constraints? - Are there technical or business limitations?
- Who are the stakeholders? - Who needs to be involved or informed?
- Which projects are involved? - Frontend, backend, shared libraries?
- What are the dependencies? - What other components might be affected?
- Are there breaking changes? - Will this impact other teams or systems?
Based on your analysis, create a clear implementation plan:
- Break down the work into logical steps
- Identify dependencies between steps
- Estimate effort for each step
- Consider risks and mitigation strategies
- Define success criteria - How will you know it's done?
- Use existing conventions - Follow the patterns already established in the codebase
- Leverage existing libraries - Don't reinvent what already exists
- Maintain consistency - Keep your changes aligned with the overall architecture
- Address the specific issue - Don't make unrelated changes
- Make incremental progress - Small, focused changes are easier to review
- Avoid scope creep - Stick to what was requested unless explicitly asked to expand
- Write clean, readable code - Future you (and your teammates) will thank you
- Add appropriate tests - Ensure your changes work and continue to work
- Update documentation - If you're changing behavior, update the docs
Always validate your changes before submitting:
# Test individual projects
nx run-many -t test,build,lint -p PROJECT_NAME
# Test affected projects
nx affected -t build,test,lint
# Run end-to-end tests
nx affected -t e2eRun the full validation suite before committing:
nx prepushIf validation fails:
- Fix the issues before proceeding
- Amend your commit rather than adding new commits just for fixes
- Don't skip validation - it's there to prevent problems
Ensure your code is properly formatted:
nx format:writeThis is mandatory - the CI pipeline will fail if code isn't formatted correctly.
When creating your pull request:
- Use a descriptive title - Make it clear what the PR does
- Fill out the PR template completely:
- Current Behavior - What happens now
- Expected Behavior - What should happen after your changes
- Related Issue(s) - Link to the issue with "Fixes #ISSUE_NUMBER"
## Current Behavior
[Describe what currently happens]
## Expected Behavior
[Describe what should happen after your changes]
## Related Issue(s)
Fixes #ISSUE_NUMBER- Summarize key changes - Help reviewers understand what you've done
- Request appropriate reviewers - Include people who know the affected code
- Add screenshots - For UI changes, show before and after
- Link related PRs - If this depends on or relates to other work
- Explain the "why" - Not just what you changed, but why
- Highlight breaking changes - If any, clearly call them out
- Include testing instructions - How can reviewers test your changes?
- Mention any special considerations - Performance, security, etc.
- Reproduce the bug - Ensure you can consistently reproduce the issue
- Identify the root cause - Don't just fix symptoms
- Write a test - Prevent the bug from coming back
- Fix the issue - Make the minimal change needed
- Verify the fix - Ensure the bug is gone and nothing else broke
- Understand the requirements - What exactly needs to be built?
- Design the solution - Consider architecture and integration points
- Implement incrementally - Build and test in small steps
- Add comprehensive tests - Ensure the feature works as expected
- Update documentation - Help others understand and use the feature
- Identify the goal - What are you trying to improve?
- Ensure test coverage - Good tests give you confidence to refactor
- Make small, safe changes - Reduce the risk of introducing bugs
- Validate frequently - Run tests after each significant change
- Document the changes - Explain what you changed and why
Validation fails after changes
- Run
nx format:writeto fix formatting - Check for linting errors and fix them
- Ensure all tests pass
PR feedback requires significant changes
- Don't be discouraged - feedback makes the code better
- Ask for clarification if feedback is unclear
- Make the requested changes and re-request review
Merge conflicts
- Rebase your branch on the latest main branch
- Resolve conflicts carefully
- Test after resolving conflicts
- Check the troubleshooting guide - Common solutions are documented
- Ask in the PR - Use comments to get clarification
- Reach out to the team - Don't struggle alone
A successful GitHub workflow results in:
- Clear understanding of what needs to be done
- Well-planned implementation that addresses the root cause
- High-quality code that follows established patterns
- Thoroughly tested changes that work as expected
- Clear communication through PR descriptions and comments
- Smooth review process with minimal back-and-forth
Now that you understand the GitHub workflow:
- Learn about the validation pipeline - Ensure your code meets quality standards
- Explore best practices - Proven approaches for common scenarios
- Review the architecture guides - Understand how to structure your code
Remember: The GitHub workflow is about more than just code - it's about clear communication, thorough testing, and collaborative problem-solving.