Skip to content

Commit

Permalink
🔄 synced local '.github' with remote '.common'
Browse files Browse the repository at this point in the history
  • Loading branch information
N6REJ committed Sep 12, 2024
1 parent 770e9d6 commit 1d5fbcd
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 24 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on: pull_request_target

name: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
metadata:
runs-on: ubuntu-latest

outputs:
repository: ${{ steps.metadata.outputs.repository }}

steps:
- uses: actions/checkout@v4

- uses: ahmadnassri/action-metadata@v2
id: metadata

auto-merge:
timeout-minutes: 5

runs-on: ubuntu-latest

# only run for dependabot PRs
if: ${{ github.actor == 'dependabot[bot]' }}

env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

steps:
- id: dependabot
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: auto merge conditions
id: auto-merge
if: |
(
steps.dependabot.outputs.update-type == 'version-update:semver-patch' &&
contains('direct:production,indirect:production', steps.dependabot.outputs.dependency-type)
) || (
steps.dependabot.outputs.update-type == 'version-update:semver-minor' &&
contains('direct:development,indirect:development', steps.dependabot.outputs.dependency-type)
)
run: echo "::notice ::auto-merge conditions satisfied"

- name: auto approve pr
if: ${{ steps.auto-merge.conclusion == 'success' }}
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --rebase "$PR_URL"
26 changes: 26 additions & 0 deletions .github/workflows/create-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Create labels

on:
push:
branches:
- 'main'

jobs:
labeler:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Run Labeler
if: success()
uses: crazy-max/ghaction-github-labeler@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
skip-delete: false
dry-run: false
exclude: |
help*
*issue
24 changes: 0 additions & 24 deletions .github/workflows/quickpick-dispatcher.yml

This file was deleted.

0 comments on commit 1d5fbcd

Please sign in to comment.