Skip to content

Commit 6c81fcd

Browse files
👷 Add latest-changes GitHub action and labeler (#11)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
1 parent e6713ab commit 6c81fcd

File tree

4 files changed

+96
-0
lines changed

4 files changed

+96
-0
lines changed

‎.github/labeler.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
docs:
2+
- all:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- README.md
6+
- SUPPORT.md
7+
- all-globs-to-all-files:
8+
- '!src/**'
9+
10+
internal:
11+
- all:
12+
- changed-files:
13+
- any-glob-to-any-file:
14+
- .github/**
15+
- .vscode/**
16+
- .husky/**
17+
- .gitignore
18+
- .vscode-test.mjs
19+
- .vscodeignore
20+
- biome.json
21+
- bun.lock
22+
- esbuild.js
23+
- tsconfig.json
24+
25+
- all-globs-to-all-files:
26+
- '!src/**'
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Labels
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
# For label-checker
9+
- labeled
10+
- unlabeled
11+
12+
jobs:
13+
labeler:
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/labeler@v6
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
22+
# Run this after labeler applied labels
23+
check-labels:
24+
needs:
25+
- labeler
26+
permissions:
27+
pull-requests: read
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: docker://agilepathway/pull-request-label-checker:latest
31+
with:
32+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,internal
33+
repo_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Latest Changes
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- main
7+
types:
8+
- closed
9+
workflow_dispatch:
10+
inputs:
11+
number:
12+
description: PR number
13+
required: true
14+
15+
jobs:
16+
latest-changes:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Dump GitHub context
20+
env:
21+
GITHUB_CONTEXT: ${{ toJson(github) }}
22+
run: echo "$GITHUB_CONTEXT"
23+
- uses: actions/checkout@v6
24+
with:
25+
# To allow latest-changes to commit to the main branch
26+
token: ${{ secrets.FASTAPI_VSCODE_LATEST_CHANGES }}
27+
- uses: tiangolo/latest-changes@0.4.1
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
latest_changes_file: release-notes.md
31+
latest_changes_header: '# Latest Changes'
32+
end_regex: '^## '
33+
debug_logs: true
34+
label_header_prefix: '## '

‎release-notes.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Release Notes
2+
3+
## Latest Changes

0 commit comments

Comments
 (0)