Skip to content

Commit 86ed211

Browse files
committed
Note limitation of looking for uses: in pattern
1 parent 5065ea8 commit 86ed211

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pr-checks/sync_back.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def update_sync_py(sync_py_path: str, action_versions: Dict[str, str]) -> bool:
8282
version = version_with_comment.split('#')[0].strip() if '#' in version_with_comment else version_with_comment.strip()
8383

8484
# Look for patterns like 'uses': 'actions/setup-node@v4'
85+
# Note that this will break if we store an Action uses reference in a
86+
# variable - that's a risk we're happy to take since in that case the
87+
# PR checks will just fail.
8588
pattern = rf"('uses':\s*'){re.escape(action_name)}@(?:[^']+)(')"
8689
replacement = rf"\1{action_name}@{version}\2"
8790
content = re.sub(pattern, replacement, content)

0 commit comments

Comments
 (0)