Azure / Azure/azure-sdk-tools

[EngSys] improve PR Diff Generation in pull request test builds

Open
#11,992 0 comments 0 reactions 0 assignees View on GitHub
Central-EngSys needs-triage
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

Currently it is comparing pull request source commit id against target branch. This requires git history and prevent PR pipelines from doing shallow clone.

https://github.com/Azure/azure-sdk-for-js/blob/e5aac771365063170a880a73b2971b744c63079a/eng/common/scripts/Helpers/git-helpers.ps1#L34-L35

It looks that with fetchDepth of 2, we can compare `HEAD^...HEAD` to get the changed files. https://dev.azure.com/azure-sdk/public/_build/results?buildId=5302405&view=logs&j=7fd4082b-93bd-5b39-44dc-2897910c0398&t=fecda729-0cc7-5830-9299-54206a067b4a

Contributor guide

Open the contributing guide

Research direction

Start in eng/common/scripts/Helpers/git-helpers.ps1 at lines 34-35 and inspect how pull request test builds determine the source and target commits. Check the linked build log and verify the changed-file comparison works with fetchDepth 2 using HEAD^...HEAD; done means PR pipelines no longer require full git history while producing the correct diff.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, git, powershell
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.