Skip to content

Commit

Permalink
fix: refresh before testing label (#3398)
Browse files Browse the repository at this point in the history
* fix: refresh before testing label

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
beckermr and pre-commit-ci[bot] authored Dec 13, 2024
1 parent e4907d8 commit 2056327
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions conda_forge_tick/events/pr_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ def _react_to_pr(uid: str, dry_run: bool = False) -> None:
pr_json = LazyJson(f"pr_json/{uid}.json")

with pr_json:
if pr_json.get("state", None) != "closed":
pr_data = refresh_pr(copy.deepcopy(pr_json.data), dry_run=dry_run)
if pr_data is not None:
if (
"Last-Modified" in pr_json
and "Last-Modified" in pr_data
and pr_json["Last-Modified"] != pr_data["Last-Modified"]
):
print("refreshed PR data", flush=True)
pr_json.update(pr_data)

if pr_json.get("state", None) != "closed":
pr_data = close_out_labels(copy.deepcopy(pr_json.data), dry_run=dry_run)
if pr_data is not None:
Expand Down

0 comments on commit 2056327

Please sign in to comment.