Skip to content

Commit e59c32b

Browse files
committed
Don't consider the release-status check-run
The releas-status is an overall status of the release without an associated workflow so there are no logs nor artifacts to consider.
1 parent f1b6571 commit e59c32b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/update-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
--layout scripts/release/release-layout.yml \
5151
--repo "$GITHUB_REPOSITORY" \
5252
--github-token "$GITHUB_REPOSITORY:$GITHUB_TOKEN" "github/codeql-coding-standards-release-engineering:$RELEASE_ENGINEERING_TOKEN" \
53+
--skip-checkrun "release-status" \
5354
--skip-checks
5455
5556
- name: Update release notes

scripts/release/update-release-assets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ def main(args: 'argparse.Namespace') -> int:
290290
workflow_runs: List[WorkflowRun.WorkflowRun] = []
291291
for check_run in check_runs: # type: ignore
292292
check_run = cast(CheckRun.CheckRun, check_run)
293-
if check_run.status != "completed" or check_run.conclusion == "skipped":
293+
if check_run.name in args.skip_checkrun:
294+
print(f"Skipping check run {check_run.name} with id {check_run.id} because it is on the skip list.")
294295
continue
295296
job_run_match = re.match(action_workflow_job_run_url_regex, check_run.details_url)
296297
if job_run_match:
@@ -356,6 +357,7 @@ def main(args: 'argparse.Namespace') -> int:
356357
parser.add_argument('--repo', help="The owner and repository name. For example, 'octocat/Hello-World'. Used when testing this script on a fork", required=True, default="github/codeql-coding-standards")
357358
parser.add_argument('--github-token', help="The github token to access repo and the repositories provided as external ids in check runs. When multiple tokens are provided use the format 'owner/repo:token'", required=True, nargs="+")
358359
parser.add_argument('--layout', help="The layout to use for the release", required=True)
360+
parser.add_argument('--skip-checkrun', help="Name of check run to exclude from consideration. Can be specified multiple times", nargs='+', default=["release-status"])
359361
parser.add_argument('--skip-checks', help="Skip the checks that ensure that the workflow runs succeeded", action="store_true")
360362
args = parser.parse_args()
361363
exit(main(args))

0 commit comments

Comments
 (0)