TT-17163: fix dependency-guard failure on branches with no merge base#131
Conversation
|
This PR fixes a bug in the Files Changed AnalysisThe change is isolated to the Architecture & Impact Assessment
graph TD
A[Start Dependency Check] --> B{Is event a Pull Request?};
B -- No --> C[Skip Check];
B -- Yes --> D{Merge base exists?};
D -- Yes --> E["Use three-dot diff (origin/base...HEAD)"];
D -- No --> F["Log Warning & Use two-dot diff (origin/base..HEAD)"];
E --> G[Check for changed dependency files];
F --> G;
G --> H{Changes found?};
H -- Yes --> I[Fail workflow];
H -- No --> J[Pass];
Scope Discovery & Context ExpansionThe change is self-contained within the workflow definition. Its impact is broad, affecting any project that imports and uses this Metadata
Powered by Visor from Probelabs Last updated: 2026-05-25T11:26:08.575Z | Triggered by: pr_opened | Commit: c6bcc5e 💡 TIP: You can chat with Visor using |
✅ Security Check PassedNo security issues found – changes LGTM. ✅ Security Check PassedNo security issues found – changes LGTM. \n\n✅ Architecture Check PassedNo architecture issues found – changes LGTM. ✅ Performance Check PassedNo performance issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-05-25T11:25:57.690Z | Triggered by: pr_opened | Commit: c6bcc5e 💡 TIP: You can chat with Visor using |
rafalgolarz
left a comment
There was a problem hiding this comment.
LGTM 👍
Thanks @olamilekan000
Issue
https://tyktech.atlassian.net/browse/TT-17163
Description
This PR resolves a bug in the reusable
dependency-guardworkflow where the pipeline crashes withfatal: origin/master...HEAD: no merge baseon branches with rewritten history, orphan branches, or direct push/release events.The Issues Addressed
tyk-analytics-uipipeline during a direct release branch push (run #25502662240).masterwould crash when using the three-dot diff (...).Proposed Changes
if:condition):github.event.pull_requestto the step check so the dependency guard is skipped entirely on direct pushes, schedules, or release dispatches.git diff origin/BASE_REF..HEAD) comparing the trees directly.