In the fast-paced world of Application development, it’s not just about writing better code—it’s about how the entire team collaborates, communicates, and efficiently delivers high-quality products. As a Lead Developer, one of my key responsibilities has been ensuring that our workflows support our growing team’s needs. This blog highlights the improvements we’ve implemented as a team, focusing on the processes and workflows that have boosted our productivity and helped us build better apps.
In this blog, we will mostly use GitHub workflows. If you need to become more familiar with that topic, kindly check the documentation link. We are going to cover three workflows in this blog.
Steps to follow to create a workflow in your Android Project:
- Create a .github folder in the root folder.
- Under the folder create a new file `.yml`. Name it the way you want to be represented. For Eg: `myworkflow.yml`.
- Then, we need to add a job that is required.
YAML - Configuration file for Github workflow.
name - It is self-explanatory, can be named the way we want.
on - Defines which event it should get triggered. (The above will be triggered when there is a pull request).
jobs - series of steps on execution. The above step contains a single job called build.
ubuntu-latest which refers to an image of the latest version of Ubuntu (a Linux operating system) which can be used to run GitHub Actions. It comes with a lot of other software preinstalled and ready to use.
PR Labeler:
Pull Requests (PRs) serve various purposes in software development and can be categorized based on the type of work being merged. Each type of PR has its characteristics and significance within the workflow. Eg: (feature, bugs, release, refactoring, and cleanup).
How can we ensure that the team follows the same pattern for branch creation? First, we need to set some protocols within the team, like the one below. *** refers to the author of the PR.
feature: ***/feature/userlogin
bugs: ***/bugs/settingspage
cleanup: ***/cleanup/dashboard
We need to create a file for the labels that we are supporting.
Whenever there is a match for the above pattern, GitHub action automatically labels the PR as per the type defined.
For Eg:
raja/feature/login or raja/feat/settings branch will have the label feature
Configuration path: The file name of the rules we defined.
Merge Conflicts Labeler
When we work as a team, quite often we encounter issues with PR conflicts. They occur when multiple developers are working on the same codebase and the changes in one branch conflict with the changes in another.
Merge conflicts are a common challenge in collaborative software development. We will not be able to know whether the PR has conflicts or not until we go inside the details of the PR. This workflow helps us to label the PRs whichever has the conflicts, allowing us to easily identify conflicts like the one below. It will also take the responsibility of removing the Merge Conflicts.
Steps to add the above job to the workflow file:
PR Statistics:
Tracking the statistics of PR reviewers is a great way to measure your team's code review processes' effectiveness and efficiency. By analyzing the statistics, you can identify patterns, improve team collaboration, and ensure high code quality.
This workflow will get triggered whenever a PR has been raised.
It will show the stats of all the members, including the Number of reviews, comments, and time taken to review the PR. We can set the dates using the field period: 15
Final workflow file:
The GitHub workflows discussed in this blog aim to simplify and automate repetitive tasks, allowing developers to focus on writing and reviewing impactful code. By implementing these workflows, our team has improved productivity and fostered a culture of transparency and shared responsibility. Adopting these workflows can make your development process more efficient whether you’re part of a small team or a large organization. Remember, the key to success is not just the tools you use, but how effectively you adapt them to your team’s unique needs.
Author:
Raja Mohamed J
Lead Consultant - EAM