Skip to content

🔄 synced file(s) with dealroom/core-mothership #29

🔄 synced file(s) with dealroom/core-mothership

🔄 synced file(s) with dealroom/core-mothership #29

Workflow file for this run

# Auto-synced file, managed by [dealroom/core-mothership](https://github.com/dealroom/core-mothership)
# The changes to this file will be automatically overwritten on the next sync. Do not edit by hand!
name: Autolabel
on:
pull_request:
types: [opened, synchronize, reopened]
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
dependabot-auto-label:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
permissions:
contents: write
pull-requests: write
repository-projects: write
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_DEALROOMBA }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
- name: Add a label for a major update
if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major' }}
run: |
gh pr edit "$PR_URL" --add-label "update-major"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
- name: Add a label for a minor update
id: dependabot-label-minor
if: steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'
run: |
gh pr edit "$PR_URL" --add-label "update-minor"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
- name: Add a label for a patch update
id: dependabot-label-patch
if: steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'
run: |
gh pr edit "$PR_URL" --add-label "update-patch"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
- name: Add a label force-lint for a super-linter upgrades
if: contains(steps.dependabot-metadata.outputs.dependency-names, 'super-linter')
run: |
gh pr edit "$PR_URL" --add-label "force-lint"
env:
PR_URL: ${{ github.event.pull_request.html_url }}