Skip to content

fix(COD-6990): get the modified files compared to HEAD^1#265

Merged
jeremydubreil merged 1 commit into
mainfrom
fix-modified-files
Jun 3, 2026
Merged

fix(COD-6990): get the modified files compared to HEAD^1#265
jeremydubreil merged 1 commit into
mainfrom
fix-modified-files

Conversation

@jeremydubreil
Copy link
Copy Markdown
Contributor

@jeremydubreil jeremydubreil commented Jun 3, 2026

This changes the logic to get the list of modified files.

Before the changes, comparing HEAD with ${baseSha} will sometimes fail because ${baseSha} is not always available on a shallow clone (with depth 2). This will sometimes lead to failures like this one here.

With this pull request, the code is now getting the list of modified files by comparing HEAD and HEAD^1 which will always be available because of the workflow is doing a checkout with depth 2.

Tested here: https://github.com/lacework-dev/WebGoat/actions/runs/26878535025?pr=142

@jeremydubreil jeremydubreil marked this pull request as ready for review June 3, 2026 10:36
Copy link
Copy Markdown
Contributor

@baltoiteodor baltoiteodor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jeremydubreil jeremydubreil merged commit 40fd916 into main Jun 3, 2026
4 checks passed
@jeremydubreil jeremydubreil deleted the fix-modified-files branch June 3, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants