Skip to content

Commit

Permalink
Various config updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Jan 4, 2023
1 parent 3d405cb commit 1077763
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 320 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
22 changes: 22 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependabot auto-merge
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.3.5
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19 changes: 3 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Main

on:
- push
- pull_request_target
- pull_request

jobs:
ci:
name: CI
Expand All @@ -21,18 +23,3 @@ jobs:
yarn lint
yarn prettier --check '**/*'
yarn test
automerge:
name: AutoMerge
needs: ci
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
steps:
- uses: actions/github-script@v3
with:
script: |
github.pulls.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@types/aria-query": "^5.0.0",
"@types/eslint-scope": "^3.7.2",
"@types/jest": "^29.2.0",
"@types/jest": "^29.2.5",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
Expand Down
Loading

0 comments on commit 1077763

Please sign in to comment.