Skip to content

Commit

Permalink
test identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkaczan committed Jul 25, 2023
1 parent 9980460 commit 1e32c86
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/create_ci_info_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
namespace = uuid.NAMESPACE_URL

data = {
"repository": os.getenv("GITHUB_REPOSITORY"),
"branch": os.getenv("BRANCH_NAME"),
"author": os.getenv("GITHUB_ACTOR"),
"repositoryName": os.getenv("GITHUB_REPOSITORY"),
"branchName": os.getenv("BRANCH_NAME"),
"authorName": os.getenv("GITHUB_ACTOR"),
"prTitle": os.getenv("PR_TITLE"),
"prNumber": os.getenv("PR_NUMBER"),
"prUrl": os.getenv("PR_URL"),
}

# Generate a unique ID for this PR across whole Github
if (
data["repository"] is None
or data["branch"] is None
data["repositoryName"] is None
or data["branchName"] is None
or data["prNumber"] is None
):
sys.exit(1)

data["prIdentifier"] = str(
uuid.uuid5(
namespace, data["repository"] + data["branch"] + data["prNumber"]
namespace, data["repositoryName"] + data["branchName"] + data["prNumber"]
)
)

Expand Down

0 comments on commit 1e32c86

Please sign in to comment.