Trying to delete some stale git branches using the Python SDK method (on v24.20.0)
sdk.delete_git_branch()
and getting this error msg
Error deleting stale branches for my_proj:
message: error: the branch 'tools' is not fully merged
hint: If you are sure you want to delete it, run 'git branch -D tools'
hint: Disable this message with "git config advice.forceDeleteBranch false"
documentation_url: https://cloud.google.com/looker/docs/r/err/4.0/400/delete/projects/:project_id/git_branch/:branch_name
error_doc_url: https://static-a.cdn.looker.app/errorcodes/400.md
error details:
Is there a way to get around this and merge a stale branch even if not fully merged?
Although I'm thinking this might only be an issue when trying to delete a branch in Looker that doesn't exist in corresponding Github repo because it was auto-deleted after PR merge. Not sure what to do in that sense.
Solved! Go to Solution.
It looks like the issue was just the user running script to delete branch didn't have dev permissions for the projects it was trying to delete branches from.
It looks like the issue was just the user running script to delete branch didn't have dev permissions for the projects it was trying to delete branches from.