You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUILD/MINOR: ci: add job to detect new go.mod dependencies in MRs
Add the check-dependencies job to the GitLab CI lint stage to automatically
detect when new Go dependencies are introduced in a merge request.
The job compares the go.mod file against the target branch and generates
a JUnit report. If new dependencies are found, the report is marked as
failed to alert reviewers. This ensures external package additions are
highly visible during code review, aiding in security and maintenance.
junit-report add --status=failed --file="go.mod" --message="new dependencies added to go.mod" --description="$(printf "The following dependencies were added:\n\n%s" "$NEW_DEPS")"
131
+
exit 1
132
+
else
133
+
echo "No new dependencies added to go.mod."
134
+
junit-report add --status=ok --file="go.mod" --message="no new dependencies added to go.mod" --description="go.mod dependency check passed"
0 commit comments