Skip to content

Commit 5e70816

Browse files
authored
Merge branch 'master' into fix-backend-test
2 parents ac923e8 + ad35807 commit 5e70816

File tree

86 files changed

+4459
-2372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+4459
-2372
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,h
1313
SECRET_KEY=changethis
1414
FIRST_SUPERUSER=admin@example.com
1515
FIRST_SUPERUSER_PASSWORD=changethis
16-
USERS_OPEN_REGISTRATION=False
1716

1817
# Emails
1918
SMTP_HOST=

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ contact_links:
44
about: Please report security vulnerabilities to security@tiangolo.com
55
- name: Question or Problem
66
about: Ask a question or ask about a problem in GitHub Discussions.
7-
url: https://github.com/tiangolo/full-stack-fastapi-template/discussions/categories/questions
7+
url: https://github.com/fastapi/full-stack-fastapi-template/discussions/categories/questions
88
- name: Feature Request
99
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already.
10-
url: https://github.com/tiangolo/full-stack-fastapi-template/discussions/categories/questions
10+
url: https://github.com/fastapi/full-stack-fastapi-template/discussions/categories/questions

.github/labeler.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
docs:
2+
- all:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- '**/*.md'
6+
- all-globs-to-all-files:
7+
- '!frontend/**'
8+
- '!backend/**'
9+
- '!.github/**'
10+
- '!scripts/**'
11+
- '!.gitignore'
12+
- '!.pre-commit-config.yaml'
13+
14+
internal:
15+
- all:
16+
- changed-files:
17+
- any-glob-to-any-file:
18+
- .github/**
19+
- scripts/**
20+
- .gitignore
21+
- .pre-commit-config.yaml
22+
- all-globs-to-all-files:
23+
- '!./**/*.md'
24+
- '!frontend/**'
25+
- '!backend/**'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Add to Project
2+
3+
on:
4+
pull_request_target:
5+
issues:
6+
types:
7+
- opened
8+
- reopened
9+
10+
jobs:
11+
add-to-project:
12+
name: Add to project
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/add-to-project@v1.0.2
16+
with:
17+
project-url: https://github.com/orgs/fastapi/projects/2
18+
github-token: ${{ secrets.PROJECTS_TOKEN }}

.github/workflows/deploy-production.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
jobs:
99
deploy:
10+
# Do not deploy in the main repository, only in user projects
11+
if: github.repository_owner != 'fastapi'
1012
runs-on:
1113
- self-hosted
1214
- production

.github/workflows/deploy-staging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
jobs:
99
deploy:
10+
# Do not deploy in the main repository, only in user projects
11+
if: github.repository_owner != 'fastapi'
1012
runs-on:
1113
- self-hosted
1214
- staging
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Generate Client
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
jobs:
10+
generate-client:
11+
permissions:
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.head_ref }}
18+
token: ${{ secrets.FULL_STACK_FASTAPI_TEMPLATE_REPO_TOKEN }}
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: lts/*
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.10'
25+
- name: Install dependencies
26+
run: npm ci
27+
working-directory: frontend
28+
- run: pip install ./backend
29+
- run: bash scripts/generate-client.sh
30+
- name: Commit changes
31+
run: |
32+
git config --local user.email "github-actions@github.com"
33+
git config --local user.name "github-actions"
34+
git add frontend/src/client
35+
git diff --staged --quiet || git commit -m "✨ Autogenerate frontend client"
36+
git push
37+
38+
# https://github.com/marketplace/actions/alls-green#why
39+
generate-client-alls-green: # This job does nothing and is only used for the branch protection
40+
if: always()
41+
needs:
42+
- generate-client
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Decide whether the needed jobs succeeded or failed
46+
uses: re-actors/alls-green@release/v1
47+
with:
48+
jobs: ${{ toJSON(needs) }}
49+

.github/workflows/issue-manager.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,41 @@ name: Issue Manager
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *"
5+
- cron: "13 4 * * *"
66
issue_comment:
77
types:
88
- created
9-
- edited
109
issues:
1110
types:
1211
- labeled
12+
pull_request_target:
13+
types:
14+
- labeled
15+
workflow_dispatch:
16+
17+
permissions:
18+
issues: write
1319

1420
jobs:
1521
issue-manager:
22+
if: github.repository_owner == 'fastapi'
1623
runs-on: ubuntu-latest
1724
steps:
25+
- name: Dump GitHub context
26+
env:
27+
GITHUB_CONTEXT: ${{ toJson(github) }}
28+
run: echo "$GITHUB_CONTEXT"
1829
- uses: tiangolo/issue-manager@0.5.0
1930
with:
2031
token: ${{ secrets.GITHUB_TOKEN }}
2132
config: >
2233
{
2334
"answered": {
24-
"users": ["tiangolo"],
2535
"delay": 864000,
26-
"message": "Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues."
36+
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
37+
},
38+
"changes-requested": {
39+
"delay": 2628000,
40+
"message": "As this PR had requested changes to be applied but has been inactive for a while, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
2741
}
2842
}

.github/workflows/labeler.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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@v5
20+
# Run this after labeler applied labels
21+
check-labels:
22+
needs:
23+
- labeler
24+
permissions:
25+
pull-requests: read
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: docker://agilepathway/pull-request-label-checker:latest
29+
with:
30+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
31+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ jobs:
3030
with:
3131
# To allow latest-changes to commit to the main branch
3232
token: ${{ secrets.LATEST_CHANGES }}
33-
- uses: docker://tiangolo/latest-changes:0.3.0
34-
# - uses: tiangolo/latest-changes@main
33+
- uses: tiangolo/latest-changes@0.3.1
3534
with:
3635
token: ${{ secrets.GITHUB_TOKEN }}
3736
latest_changes_file: ./release-notes.md

0 commit comments

Comments
 (0)