Skip to content

Commit

Permalink
[pre-commit] Add DOCKERFILES_INFO_REPO_PRIMARY_BRANCH (#4325)
Browse files Browse the repository at this point in the history
* [pre-commit] Add DOCKERFILES_INFO_REPO_PRIMARY_BRANCH

* Add changelog
  • Loading branch information
mmhw committed Jun 5, 2024
1 parent 45c3b8a commit 28b0552
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .changelog/4325.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue in the `pre-commit` command where if the DEMISTO_DEFAULT_BRANCH environment variable was set to something other than "master", the command would fail.
type: fix
pr_number: 4325
1 change: 1 addition & 0 deletions demisto_sdk/commands/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,7 @@ class IncidentFieldType: # For more info please see https://xsoar.pan.dev/docs/
FORMATTING_SCRIPT = "indicator-format"

DOCKERFILES_INFO_REPO = "demisto/dockerfiles-info"
DOCKERFILES_INFO_REPO_PRIMARY_BRANCH = "master"
DOCKERFILES_REPO = "demisto/dockerfiles"
CONTENT_REPO = "demisto/content"

Expand Down
4 changes: 2 additions & 2 deletions demisto_sdk/commands/common/docker_images_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from requests.exceptions import ConnectionError

from demisto_sdk.commands.common.constants import (
DEMISTO_GIT_PRIMARY_BRANCH,
DOCKERFILES_INFO_REPO,
DOCKERFILES_INFO_REPO_PRIMARY_BRANCH,
)
from demisto_sdk.commands.common.docker.docker_image import DockerImage
from demisto_sdk.commands.common.files.errors import FileReadError
Expand Down Expand Up @@ -37,7 +37,7 @@ def get_instance_from(cls, *args, **kwargs):
def __from_github(
cls,
file_name: str = DOCKER_IMAGES_METADATA_NAME,
tag: str = DEMISTO_GIT_PRIMARY_BRANCH,
tag: str = DOCKERFILES_INFO_REPO_PRIMARY_BRANCH,
):
"""
Get the docker_images_metadata.json from the dockerfiles-info repo and load it to a pydantic object.
Expand Down

0 comments on commit 28b0552

Please sign in to comment.