CI/CD Insights and Analytics

An advanced tip for better pull requests and code reviews

Foresight's pull request comments with major impacts make it easier to understand the workflow and test performance in your PRs
Burak Kantarcı
3 mins read

Any information available on the internet is about the foundational steps of creating better pull requests and reviewing code better. In this article, we are sharing an advanced tip about gaining performance visibility into the pull requests (PR) and making your lives easier while reviewing code.

Gaining a better understanding of the overall workflow and test performance of your GitHub PRs and taking steps to improve them if necessary can be tiresome. Moreover, you may easily fail to notice if there are major circumstances in a PR. Gaining visibility into your CI pipelines becomes critical in those cases.

For each PR, you should bat around multiple tabs in GitHub, like Insights, Pulse, Commits, and Graphs, to have an understanding of the impact of the PR. But still, it is tough to understand how long the workflows and tests took or how many of the workflows and tests in that PR are failed, skipped, or successful in that PR.

Foresight’s pull request comments

We are excited to announce a new feature: Foresight's pull request comments with major impacts! Foresight’s pull request comments on GitHub can provide a number of benefits, including:

  • Automated code reviews: Pull request comments can automatically review code for common issues, such as style inconsistencies or potential bugs. This can save time for human reviewers and help ensure that code is of high quality.
  • Enhanced collaboration: Pull request comments can be configured to notify team members when a pull request is opened or updated, making it easier for everyone to stay up-to-date on the latest code changes.
  • Improved workflow: Pull request comments can be integrated with other tools, such as continuous integration systems, to automate parts of the code review and deployment process. This can help teams work more efficiently and accelerate their development cycles.

Overall, pull request comments can help teams improve the quality of their code, enhance collaboration, and streamline their development workflow.

Major Impacts of the PR!

This feature allows Foresight to comment on a pull request, making it easier to have discussions and provide feedback on the workflow and the test impacts of the pull request.

For example, the major impacts of Foresight’s pull request comments can help you easily detect if there’s an anomaly. You can pinpoint if the total workflow or test duration jumped up enormously or if there are a high number of failed workflow or test runs in that PR.

How Foresight users use this feature

Open Telemetry has been using Foresight's pull requests. Let's dive into what was shown in a pull request comment: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16610#issuecomment-1337012337

The badges show:

  • Their latest workflows have succeeded 6/7, and 1 of them has skipped.
  • The latest test runs have succeeded with 27.5K successful and 237 skipped tests in total. If there were a failed test, it would have been easily detected, and PR would have been blocked.
  • Since the beginning of the pull request, there were 8h 14m spent on workflows, and 5h 37m of them were testing.

Major impacts:

  • The duration of one of their workflows, load-tests, has jumped from 17m 6s avg to 27m 53s in this PR. It may be an alert that this contribution will slow future workflows down. Therefore, the reviewers should carefully watch the things added/removed in this PR.

Summary

To use this feature, login to your Foresight account and simply navigate to your Organization settings, enable pull request comments and check results. After enabling, your contributors will be able to see the results in each pull request comment in the same thread.

This new feature will improve collaboration within our community and make it easier for contributors to submit high-quality code. Foresight's GitHub monitoring capabilities enhances your CICD observability. Thank you for your continued support, and we look forward to seeing the great ideas and discussions that come from this new feature.

Flexible pricing that scales with your team, and free for open-source!

See our pricing plans