diff --git a/.github/workflows/update-python-dependencies.yaml b/.github/workflows/update-python-dependencies.yaml index d6f1707..2f9465e 100644 --- a/.github/workflows/update-python-dependencies.yaml +++ b/.github/workflows/update-python-dependencies.yaml @@ -234,7 +234,17 @@ jobs: - name: โณ Wait for prek hooks wait: install-hooks - name: ๐Ÿ“‘ Stage dependency changes - run: git add --all + run: | + set -euo pipefail + while read -r lock; do + # Nab stamps created-at on every run; a lock that differs only there carries no dependency change. + real=$(git diff -U0 --no-color -- "$lock" | grep -cvE '^(\+\+\+|---|@@|diff |index )|^[-+]created-at = |^ ' || true) + if [[ "$real" == 0 ]]; then + git checkout -- "$lock" + echo "Lock change dropped: only created-at moved in $lock" + fi + done < <(git diff --name-only -- '*pylock*.toml') + git add --all - id: hooks name: ๐Ÿงน Run repository hooks continue-on-error: true diff --git a/changelog.d/+timestamp-only-locks.bugfix.md b/changelog.d/+timestamp-only-locks.bugfix.md new file mode 100644 index 0000000..e93a6ea --- /dev/null +++ b/changelog.d/+timestamp-only-locks.bugfix.md @@ -0,0 +1,2 @@ +Maintenance pull requests are no longer opened when a refreshed Nab lock differs from the committed one only in its +`created-at` timestamp. diff --git a/github_workflows.egg-info/PKG-INFO b/github_workflows.egg-info/PKG-INFO new file mode 100644 index 0000000..126d47b --- /dev/null +++ b/github_workflows.egg-info/PKG-INFO @@ -0,0 +1,8 @@ +Metadata-Version: 2.4 +Name: github-workflows +Version: 0.0.0 +Summary: Shared release actions for tox-dev repositories +License-Expression: MIT +Requires-Python: >=3.15 +License-File: LICENSE +Dynamic: license-file diff --git a/github_workflows.egg-info/SOURCES.txt b/github_workflows.egg-info/SOURCES.txt new file mode 100644 index 0000000..d1957d0 --- /dev/null +++ b/github_workflows.egg-info/SOURCES.txt @@ -0,0 +1,8 @@ +LICENSE +README.md +pyproject.toml +github_workflows.egg-info/PKG-INFO +github_workflows.egg-info/SOURCES.txt +github_workflows.egg-info/dependency_links.txt +github_workflows.egg-info/top_level.txt +tests/test_conftest.py diff --git a/github_workflows.egg-info/dependency_links.txt b/github_workflows.egg-info/dependency_links.txt new file mode 100644 index 0000000..e69de29 diff --git a/github_workflows.egg-info/top_level.txt b/github_workflows.egg-info/top_level.txt new file mode 100644 index 0000000..e69de29 diff --git a/refresh-release-lock/action.yml b/refresh-release-lock/action.yml index 496aa7e..21d4c10 100644 --- a/refresh-release-lock/action.yml +++ b/refresh-release-lock/action.yml @@ -162,6 +162,17 @@ runs: else echo 'Secondary lock skipped: additional-lock input is empty' fi + if [[ "$MODE" != check ]]; then + for lock in "${paths[@]}"; do + git diff --quiet -- "$lock" && continue + # Nab stamps created-at on every run; a lock that differs only there carries no dependency change. + real=$(git diff -U0 --no-color -- "$lock" | grep -cvE '^(\+\+\+|---|@@|diff |index )|^[-+]created-at = |^ ' || true) + if [[ "$real" == 0 ]]; then + git checkout -- "$lock" + echo "Lock change dropped: only created-at moved in $lock" + fi + done + fi if [[ "$MODE" == check ]]; then if ! git diff --exit-code -- "${paths[@]}"; then echo "::error::regenerated locks differ from the checkout: ${paths[*]}" >&2