From 73ccafeb7b53e3f526da2806b9611cdefe1942d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Wed, 4 Nov 2026 15:15:32 -0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix(workflows):=20skip=20tim?= =?UTF-8?q?estamp-only=20lock=20refreshes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nab rewrites `created-at` in every lock it writes, so a refresh with no dependency change still left a one-line diff, and upgrade-release-tools and update-python-dependencies opened a pull request for it (toml-fmt #519). Both now restore a lock whose only changed line is `created-at` before deciding whether anything changed. The check counts the changed lines rather than stopping at the first match, so a large lock diff can't end the pipeline early and be mistaken for a timestamp-only one. --- .github/workflows/update-python-dependencies.yaml | 12 +++++++++++- changelog.d/+timestamp-only-locks.bugfix.md | 2 ++ github_workflows.egg-info/PKG-INFO | 8 ++++++++ github_workflows.egg-info/SOURCES.txt | 8 ++++++++ github_workflows.egg-info/dependency_links.txt | 1 + github_workflows.egg-info/top_level.txt | 1 + refresh-release-lock/action.yml | 11 +++++++++++ 7 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 changelog.d/+timestamp-only-locks.bugfix.md create mode 100644 github_workflows.egg-info/PKG-INFO create mode 100644 github_workflows.egg-info/SOURCES.txt create mode 100644 github_workflows.egg-info/dependency_links.txt create mode 100644 github_workflows.egg-info/top_level.txt 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..f307803 --- /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 \ No newline at end of file diff --git a/github_workflows.egg-info/dependency_links.txt b/github_workflows.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/github_workflows.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/github_workflows.egg-info/top_level.txt b/github_workflows.egg-info/top_level.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/github_workflows.egg-info/top_level.txt @@ -0,0 +1 @@ + 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 From 3435d8571fc79384b6f17804a06a8a96920c7d6a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 23:15:45 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- github_workflows.egg-info/SOURCES.txt | 2 +- github_workflows.egg-info/dependency_links.txt | 1 - github_workflows.egg-info/top_level.txt | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/github_workflows.egg-info/SOURCES.txt b/github_workflows.egg-info/SOURCES.txt index f307803..d1957d0 100644 --- a/github_workflows.egg-info/SOURCES.txt +++ b/github_workflows.egg-info/SOURCES.txt @@ -5,4 +5,4 @@ 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 \ No newline at end of file +tests/test_conftest.py diff --git a/github_workflows.egg-info/dependency_links.txt b/github_workflows.egg-info/dependency_links.txt index 8b13789..e69de29 100644 --- a/github_workflows.egg-info/dependency_links.txt +++ b/github_workflows.egg-info/dependency_links.txt @@ -1 +0,0 @@ - diff --git a/github_workflows.egg-info/top_level.txt b/github_workflows.egg-info/top_level.txt index 8b13789..e69de29 100644 --- a/github_workflows.egg-info/top_level.txt +++ b/github_workflows.egg-info/top_level.txt @@ -1 +0,0 @@ -