Skip to content

figure out target branch dynamically #5

@whenceforth

Description

@whenceforth

Newer projects tend to merge pull requests into 'main'. Older projects tend to merge pull requests into 'master'. Other projects may do something else entirely.

The current code uses a config var. It would be nicer to be able get it dynamically so the config is not needed except in unusual cases. This looks like a good way to get it:

$ git branch -r --list 'origin/HEAD'
   origin/HEAD -> origin/main
  • Don't do the dynamic lookup if the target is configured
  • Comment out the target from the default config and add info for why it's optional, etc.
  • Make sure it works for repos that don't have a remote.

I am continuing to assume the upstream is 'origin' Handling multiple remotes is something I don't need yet. Will look into that if the need arises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions