Skip to content

Conversation

pwtyler
Copy link
Contributor

@pwtyler pwtyler commented Jun 13, 2025

Checking for any branch that matches prefix means that if this action ran in the past and a PR was closed, the next time WordPress is upgraded, it happily does nothing. Past PRs are closed in favor of the new one. PRs for the same version are a no-op success.

#18 was created from an old version of the project, trying again. Addresses #16.

@jazzsequence
Copy link
Owner

I think the idea was that the old branch should be deleted after it's merged. In case of a clash, if the versions do not match, I would prefer if the older branch is deleted in favor of the newer branch. e.g.

Current WordPress Version: 6.8.1
Found 'Tested up to' version in readme.txt: 6.7.2
Tested up to version (6.7.2) is less than current WordPress version (6.8.1).
Updating files with new Tested up to version.
Checking if a branch with the name update-tested-up-to-version-6.7.2 exists.
A branch with the name update-tested-up-to-version-6.7.2 exists. Deleting outdated branch and creating new branch.
Branch update-tested-up-to-version-6.8.1 created.
Updating 'Tested up to' version in /home/runner/work/wp-redis/wp-redis/./readme.txt
Updating 'Tested up to' version in /home/runner/work/wp-redis/wp-redis/./README.md
...

If we've gotten to the step where the versions are compared, if the versions don't match, we should delete the older one. Maybe there should be a check to ensure that the version is actually < the newer version. I don't like the idea of the action creating a whole bunch of new branches that never get cleaned out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants