Skip to content

Commit 9de2cc0

Browse files
committed
ci: Add MANIFEST.in and automerge workflow
1 parent 7dade26 commit 9de2cc0

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/automerge.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# The pull_request_target workflow trigger is dangerous. Do not add unrelated logic to this workflow.
2+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
3+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
4+
name: Auto-merge
5+
on: pull_request_target
6+
permissions:
7+
pull-requests: write # to approve the PR
8+
contents: write # to merge the PR
9+
jobs:
10+
dependabot:
11+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- id: dependabot-metadata
15+
uses: dependabot/fetch-metadata@v2
16+
with:
17+
github-token: ${{ secrets.GITHUB_TOKEN }}
18+
- if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' || steps.dependabot-metadata.outputs.package-ecosystem == 'github_actions' }}
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
run: gh pr review --approve ${{ github.event.pull_request.html_url }}
22+
- if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' || steps.dependabot-metadata.outputs.package-ecosystem == 'github_actions' }}
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
26+
precommit:
27+
if: ${{ github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: gh pr review --approve ${{ github.event.pull_request.html_url }}
33+
- env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}

.github/workflows/lint.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
- uses: actions/setup-python@v5
1010
with:
1111
python-version: '3.10'
12-
- run: pip install --upgrade flake8 isort
12+
- run: pip install --upgrade check-manifest flake8 isort
1313
- run: flake8 .
1414
- run: isort .
15+
- run: check-manifest

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include *.py

0 commit comments

Comments
 (0)