[redis]: Implement proxy for non sentinel aware proxies #403
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-label issues | |
| on: | |
| issues: | |
| types: [opened] | |
| pull_request: | |
| types: [opened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| label: | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Apply labels | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| let content = ""; | |
| if (context.payload.pull_request) { | |
| const parsedTitle = context.payload.pull_request.title.match(/^\[([a-z_-]+(?:, [a-z_-]+)*)\].+$/); | |
| content = parsedTitle ? parsedTitle[1] : ""; | |
| } else { | |
| content = context.payload.issue.body.split(/### Affected Helm charts/)[1] || ""; | |
| } | |
| const { data } = await github.rest.issues.listLabelsForRepo({ | |
| ...context.repo, | |
| per_page: 100, | |
| }); | |
| const existingLabels = new Set(data.map((label) => label.name)); | |
| const labels = content | |
| .trim() | |
| .split(",") | |
| .map((s) => s.trim()) | |
| .filter((s) => s && existingLabels.has(s)); | |
| if (labels.length) { | |
| console.log(`Adding ${labels.length} labels: ${labels.join(', ')}`) | |
| await github.rest.issues.addLabels({ | |
| ...context.repo, | |
| issue_number: context.issue.number, | |
| labels, | |
| }); | |
| } |