mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Rename script for consistency
This commit is contained in:
2
.github/workflows/rebuild.yml
vendored
2
.github/workflows/rebuild.yml
vendored
@@ -77,7 +77,7 @@ jobs:
|
||||
cd pr-checks
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruamel.yaml==0.17.31
|
||||
python3 sync-back.py
|
||||
python3 sync_back.py
|
||||
python3 sync.py
|
||||
|
||||
- name: "Merge in progress: Finish merge and push"
|
||||
|
||||
@@ -27,10 +27,10 @@ To sync action versions from generated workflows back to source templates:
|
||||
|
||||
```bash
|
||||
# Dry run to see what would be changed
|
||||
python3 pr-checks/sync-back.py --dry-run --verbose
|
||||
python3 pr-checks/sync_back.py --dry-run --verbose
|
||||
|
||||
# Actually apply the changes
|
||||
python3 pr-checks/sync-back.py
|
||||
python3 pr-checks/sync_back.py
|
||||
```
|
||||
|
||||
The sync-back script automatically updates:
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Tests for the sync-back.py script
|
||||
Tests for the sync_back.py script
|
||||
"""
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
import shutil
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
# Add the current directory to sys.path and import the sync_back module
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Import the sync-back module
|
||||
import importlib.util
|
||||
spec = importlib.util.spec_from_file_location("sync_back", os.path.join(os.path.dirname(__file__), "sync-back.py"))
|
||||
spec = importlib.util.spec_from_file_location("sync_back", os.path.join(os.path.dirname(__file__), "sync_back.py"))
|
||||
sync_back = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(sync_back)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user