jazzsequence / action-validate-plugin-version

A GitHub action that validates the last tested plugin version against the current version of WordPress.
MIT License
0 stars 1 forks source link

Use default branch, not 'main' as fallback #11

Open pwtyler opened 3 weeks ago

pwtyler commented 3 weeks ago
  branch:
    description: The branch to use as the base for PRs and commit the changes back to.
    required: false
    default: 'main'

https://github.com/jazzsequence/action-validate-plugin-version/blob/main/action.yml#L24-L27

Input should not default to "main", but instead if not provided, should use the default branch (usually but not always main)

jazzsequence commented 3 weeks ago

How would we canonically determine the default branch? Is that something that GitHub actions knows? I defaulted to main because I wasn't sure how the action would know what the default branch of the requesting repository would be.

pwtyler commented 3 weeks ago

Hmm, this may actually be a bug with your current implementation too. ~assumptions here may be wrong~ but my guess is, when this runs on the default branch and PRs against the release branch, then we might be PR'ing more than we want.

Current Behavior

(have not asserted this is truly the case or not) Cron actions only work on the default branch

Expected Behavior

EDIT: Yep https://github.com/pantheon-systems/plugin-pipeline-example/pull/88/files