Automatically delete branch in Looker when deleted in Git remote

When a developer merges a branch via a GitHub PR, GitHub automatically deletes the branch on remote. However the branch still exists in Looker and has to be manually deleted. It would be nice if this process happened automatically to avoid developers having to go through pages of merged branches every few months.

I tried automating it via a GitHub Action that runs delete_git_branch whenever a branch (not dev-) is merged using a Service Account with full admin permissions, but I get:

'{"message":"Developer mode required","documentation_url":"https://cloud.google.com/looker/docs/r/err/4.0/400/delete/projects/:project_id/git_branch/:branch_na..."}'

I'd much rather it happened automatically if possible.

3 2 847
2 REPLIES 2