Skip to content

Commit

Permalink
Update pre-job.j2
Browse files Browse the repository at this point in the history
  • Loading branch information
weiiwang01 committed Jun 18, 2023
1 parent effcdb5 commit db551e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/pre-job.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ else:
session = requests.session()
session.headers["Authorization"] = "Bearer {{one_time_token}}"
session.trust_env = False
response = session.post("http://{{host_ip}}:8080/check-run", timeout=10, json={
payload = {
"repository_name": repository_name,
"source_repository_name": source_repository_name,
"target_branch_name": target_branch_name,
"source_branch_name": source_branch_name,
"commit_sha": commit_sha
})
}
print("repo policy compliance check with payload: {payload}")
response = session.post("http://{{host_ip}}:8080/check-run", timeout=10, json=payload)
response.raise_for_status()
EOF

0 comments on commit db551e8

Please sign in to comment.