Probots and GitLab to GitHub Integration: Final Phase Completion

2020-08-30 06:53
Written by
kartik1000 - member of the CiviCRM community - view blog guidelines

Hello All! This Blog is in continuation to my previous blog. This is the final blog of my project and I will try to summarise all the work, I have done during the Probots and GitLab to GitHub Integration Project. I will also share my amazing experience with the CiviCRM team and especially my mentors Eileen McNaughton and Saurabh Batra. I will share a brief on all the features added and how the CiviCRM community members can use them when they have been merged with the existing CiviCRM-bot.

  1. Welcoming new contributors on GitHub - This feature is to ensure that the newcomer's welcome notice and guidelines are published only on pull requests created by new contributors and not posted on every pull request. The template of the notice has also been modified a little and now also asks the user to add their details in contributors.yml. However, the details of Reviewing standards will still be posted on every pull request. This has been done since the new welcome-message was almost useless to a long-time contributor yet it was posted again and again. Here are the commit details.
  2. Removing Stale-PRs - This addition will make sure that the pull requests which did not have any activity for a considerable time will be automatically marked as stale and will be closed if they have no activity further. This will make sure that pull requests on which requested changes are being not made, will be automatically closed which will help save reviewers time or if it is not fixing the issue then also it will be automatically closed. The bot will at first add a stale label, if the pull request has some activity a few days after it it will remove the label, else it will close the pull request. Here are the commit details.
  3. Adding Labels on pull requests through comments: The reviewers will now be able to add/drop a list labels on a pull request directly by posting comments in the pull request. To add a label they can simply post a comment as /label add,needs-documentations,needs-tests and to drop an existing label they can comment /label remove,needs-documentation,needs-test. This will make adding/dropping labels very easy for reviewers and will allow labels to be used more extensively for reviewing. The syntax for the Here are the commit details.
  4. Adding a reference to a pull request on GitLab issue and vice-versa: This is the first step towards integrating GitLab and GitHub. If any pull request is titled in the format dev/project_name#issue_number then the bot will automatically post reference of this pull request in issue-discussion in GitLab and also vice-versa the URL of issue will be posted in pull request comments. This will help any reviewer to directly go to the issue, on which the pull request is based and will also let know any contributor/member if someone else is working on that issue from issue discussions. This task was done using GitHub webhooks and Gitbeaker (a GitLab API service) Here are the commit details.
  5. Closing issues directly from comments: This feature will allow community members to directly close issues after merging a pull request from pull request comments. To close an issue related to a pull request one simply needs to post /close in comments and that will close issue related to that pull request. This will prevent resolved issues to be opened unnecessarily. Again a pull request needs to be named in dev/project_name#issue_number format for this to work as the title is used for extracting issue_number and project_name. Here are the commit details.
  6. Docs-integration: This is the first step towards integrating our code pull requests and their related documentations. Whenever a pull request is merged or closed there status will be posted in their corresponding docs pull request so as to allow the docs maintainer to know whether this needs to be merged or not. For this, to work we will just have to name our docs merge request in the format #pull_request_number:xyz. We will still be working more in this direction after the project deadline. Here are the commit details.

These were all the features which have been added during this project. As a team we are also excited to learn the experience of community members while using these bot upgradations and will look to work on suggested changes and more improvements. This project would not at all have been possible without successful collaboration of Saurabh Batra, Eileen McNaughton, Micheal O'Toole and Mathieu. All of them have provided a lot of valuable inputs and ideas involved in this project. More so, they have also helped me in getting known to all the new technologies involved in this project and any other requirements which I have faced during this project. My mentors Saurabh Batra and Eileen McNaughton have always been spot-on to organize a video-call meet-up whenever we have faced any kind of difficulties and have been highly involved in all the suggestions and discussions. As for me, this project has been a huge learning opportunity and not have I only learnt to work on a project with a team but also on how to learn new technologies which hardly have any documentations on the internet. These past three months have been a great learning curve for me. I am highly interested and looking forward to work with all the CiviCRM members in future projects.

Filed under