Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Note limitation of looking for uses: in pattern
  • Loading branch information
henrymercer committed Sep 22, 2025
commit 86ed2117d5126886b07d25a0a5db0ee16734d81b
3 changes: 3 additions & 0 deletions pr-checks/sync_back.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def update_sync_py(sync_py_path: str, action_versions: Dict[str, str]) -> bool:
version = version_with_comment.split('#')[0].strip() if '#' in version_with_comment else version_with_comment.strip()

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