Skip to content

Commit

Permalink
auto merge dependentbot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong committed Jan 23, 2024
1 parent ef74c14 commit ee5303a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 39 deletions.
30 changes: 9 additions & 21 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,16 @@ codecov:
require_ci_to_pass: true

coverage:
precision: 1
round: down
range: "70...100"
status:
project:
default: false
default:
target: auto
threshold: 0.5%

comment:
layout: "header, diff, components, files"

component_management:
default_rules:
statuses:
- type: project
target: auto
branches:
- "!main"
individual_components:
- component_id: konf
paths:
- "!provider/pflag/"
- "!provider/file/"
- component_id: file
paths:
- "provider/file/"
- component_id: pflag
paths:
- "provider/pflag/"
layout: "reach,diff,flags,tree"
behavior: default
require_changes: true
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@ version: 2
updates:
- package-ecosystem: gomod
directory: /
labels:
- Skip-Changelog
schedule:
interval: daily

- package-ecosystem: gomod
directory: /provider/file
labels:
- Skip-Changelog
schedule:
interval: daily

- package-ecosystem: gomod
directory: /provider/pflag
labels:
- Skip-Changelog
schedule:
interval: daily

- package-ecosystem: github-actions
directory: /
labels:
- Skip-Changelog
schedule:
interval: daily
18 changes: 0 additions & 18 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,14 @@ name: Dependabot
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Add a label for all production dependencies
if: ${{ steps.metadata.outputs.dependency-type == 'direct:production' }}
run: gh pr edit "$PR_URL" --add-label "Skip-Changelog"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
if: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down

0 comments on commit ee5303a

Please sign in to comment.