fix: issue 2043, revising connector cards display and ui for better user understanding. #710
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Delete Merged Branch | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| delete-branch: | |
| if: github.event.pull_request.merged == true | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Delete merged branch | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| const branchName = context.payload.pull_request.head.ref; | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| // Don't delete main/master/develop branches | |
| const protectedBranches = ['main', 'master', 'develop']; | |
| if (protectedBranches.includes(branchName)) { | |
| console.log(`Skipping deletion of protected branch: ${branchName}`); | |
| return; | |
| } | |
| try { | |
| await github.rest.git.deleteRef({ | |
| owner, | |
| repo, | |
| ref: `heads/${branchName}` | |
| }); | |
| console.log(`Successfully deleted branch: ${branchName}`); | |
| } catch (error) { | |
| console.log(`Could not delete branch ${branchName}: ${error.message}`); | |
| } | |