Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite50bff6

Browse files
committed
Deduplicate claim ref lookup
1 parentdecbc9a commite50bff6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

‎oidc-exchange.py‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,13 @@ def warn_on_reusable_workflow(claims: dict[str, typing.Any]) -> None:
222222
# A reusable workflow is identified by having different values
223223
# for its workflow_ref (the initiating workflow) and job_workflow_ref
224224
# (the reusable workflow).
225-
ifclaims.get('workflow_ref')==claims.get('job_workflow_ref'):
225+
workflow_ref=claims.get('workflow_ref')
226+
job_workflow_ref=claims.get('job_workflow_ref')
227+
228+
ifworkflow_ref==job_workflow_ref:
226229
return
227230

228-
warn(
229-
_REUSABLE_WORKFLOW_WARNING.format(
230-
job_workflow_ref=claims.get('job_workflow_ref'),
231-
workflow_ref=claims.get('workflow_ref'),
232-
),
233-
)
231+
warn(_REUSABLE_WORKFLOW_WARNING.format_map(locals()))
234232

235233

236234
defevent_is_third_party_pr()->bool:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp