Skip to content

Commit

Permalink
Add tagger date and version:refname sort attribute for fetching relea…
Browse files Browse the repository at this point in the history
…ses branches (red-hat-data-services#1503)

add tagger date and version:refname sort attribute
  • Loading branch information
bdattoma committed Jun 5, 2024
1 parent f26b255 commit c0c15da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ods_ci/utils/scripts/fetch_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def checkout_repository(ref):

def get_branch(ref_to_exclude, selector_attribute):
"""
List the remote branches and sort by last commit date (ASC order), exclude $ref_to_exclude and get latest
List the remote branches and sort by selector_attribute date (ASC order), exclude $ref_to_exclude and get latest
"""
ref_to_exclude_esc = ref_to_exclude.replace("/", r"\/")
cmd = f"git branch -r --sort={selector_attribute} | grep releases/"
Expand Down Expand Up @@ -192,8 +192,8 @@ def extract_new_test_cases(test_repo, ref_1, ref_2, ref_2_auto, selector_attribu
help="Select the git attribute to use when --ref2-auto is enabled",
action="store",
dest="selector_attribute",
choices=["creatordate", "committerdate", "authordate"],
default="creatordate",
choices=["creatordate", "committerdate", "authordate", "taggerdate", "version:refname"],
default="version:refname",
)

args = parser.parse_args()
Expand Down

0 comments on commit c0c15da

Please sign in to comment.