Closed
Description
It'd be nice if I could do get-metadata
(or get-metadata @
) if I'm on a fork branch with an open PR.
Could do something like:
# Get the remote url of the upstream branch (if it exists).
remote=$(git remote get-url $(git rev-parse --abbrev-ref --symbolic-full-name @{u} | cut -d / -f 1))
branch=$(git symbolic-ref --short HEAD) # Or branch parameter passed.
# Convert to https:// syntax if it's ssh syntax ([email protected])
# Work out what PR has that as a base branch
# Pass PR number through to the rest of get-metadata.