Closed armcknight closed 1 year ago
Thank you for the report 😄 Are branches that were not deleted associated with PRs? Do you see something like this?
Branches not deleted
armcknight/ref/json-serialization-error-reporting
└─ #2355 https://github.com/getsentry/sentry-cocoa/pull/2355 armcknight
If the PR has been merged, but the local commit is further along than the latest commit SHA of the PR, the branch is not deleted so that the changes are not lost. Is this the case?
---
title: Example
---
gitGraph
commit
commit
branch issue1
checkout issue1
commit
commit
checkout main
merge issue1
checkout issue1
commit
Another guess is that I used ref in the branch name for refactor, I wonder if you're filtering out ref since that's also a special word used by git.
No problem branch name with ref
gh ext ls didn't work for me, is that in a newer version of gh?
Yes, ext
is available in a slightly newer version of gh
Hi @seachicken thanks for responding with those details. You are correct that it is not displayed with an associated PR. Looking at the commits it's currently referencing, your guess looks right, there are different changes locally than was in the PR. Sorry for the mixup, I'll try to be more careful with not reusing branch refs/names next time!
Describe the bug
Hey, first of all thanks for providing this extension, I found it when I was going to learn how to create a
gh extension
for a terminal one-liner I cobbled together:OK, now for the bug report:
My one-liner lists the following branches from merged PRs for the repo I'm currently working in:
and I tried running
gh poi --dry-run
and it reported it would've deleted the following local branches:However, there's one branch it would not have deleted:
armcknight/ref/json-serialization-error-reporting
.The URL that is returned for that ref from
gh pr list -L 1000 --author @me --state merged --json headRefName,url
is https://github.com/getsentry/sentry-cocoa/pull/2355 which is indeed merged.One guess I had was that the base ref at the time was
master
, but we've since changed the default base tomain
. But, all the others were also merged intomaster
before we made that switch.Another guess is that I used
ref
in the branch name forrefactor
, I wonder if you're filtering outref
since that's also a special word used by git.It could also be that the PR is too old and you're fetching a limited number of PRs that doesn't include this branch.
Your Environment
gh --version
):gh ext ls
):(Note:
gh ext ls
didn't work for me, is that in a newer version ofgh
?)