Skip to content

fix(dependency_updater): guard against index out of range when branchCommit is empty #1161

Description

@ygd58

In dependency_updater.go getVersionAndCommit(), branchCommit[0].SHA is accessed without checking if the slice is empty. If the GitHub API returns zero commits for the branch, this panics with index out of range. Added a len check that returns a descriptive error instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions