Skip to content

Commit 97c8794

Browse files
Merge remote-tracking branch 'origin/master' into lz/rn7-migration
2 parents 3c45896 + 0947ab4 commit 97c8794

File tree

1,259 files changed

+23751
-9065
lines changed

Some content is hidden

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

1,259 files changed

+23751
-9065
lines changed

.github/CODEOWNERS

Lines changed: 31 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,47 @@
11
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
22

3+
# See https://github.com/getsentry/sentry-docs/pull/13662 on how commented codeowners are tagged
4+
35
# Requiring review from security team for Content-Security-Policy changes
46
**/vercel.json @getsentry/security
57

6-
# owners-api is tagged here but anyone can just approve the SHA Bump PRs
7-
/src/build/resolveOpenAPI.ts @getsentry/owners-api
8-
98
# Codeowners listed below are used as a reference for the Sentry team to know who to contact for a given area of the codebase.
109

11-
# /src/platforms/android/ @getsentry/team-mobile-core
12-
# /src/wizard/android/ @getsentry/team-mobile-core
13-
# /src/platforms/apple/ @getsentry/team-mobile-core
14-
# /src/wizard/apple/ @getsentry/team-mobile-core
15-
# /src/platforms/dart/guides/flutter/ @getsentry/team-mobile-cross-platform
16-
# /src/wizard/flutter/ @getsentry/team-mobile-cross-platform
17-
# /src/platforms/dart/ @getsentry/team-mobile-cross-platform
18-
# /src/wizard/dart/ @getsentry/team-mobile-cross-platform
19-
# /src/platforms/react-native/ @getsentry/team-mobile-cross-platform
20-
# /src/wizard/react-native/ @getsentry/team-mobile-cross-platform
21-
# /src/platforms/unity/ @getsentry/team-mobile-cross-platform
22-
# /src/wizard/unity/ @getsentry/team-mobile-cross-platform
23-
# /src/wizard/cordova/ @getsentry/team-mobile-cross-platform
24-
25-
# /src/platforms/dotnet/ @getsentry/team-mobile-cross-platform
26-
# /src/wizard/dotnet/ @getsentry/team-mobile-cross-platform
27-
# /src/platforms/java/ @getsentry/team-mobile-core
28-
# /src/wizard/java/ @getsentry/team-mobile-core
29-
30-
# /src/platforms/native/ @getsentry/owners-native
31-
# /src/wizard/native/ @getsentry/owners-native
32-
# /src/wizard/minidump/ @getsentry/owners-native
33-
# /src/platforms/rust/ @getsentry/owners-native
34-
# /src/wizard/rust/ @getsentry/owners-native
35-
36-
# /src/docs/product/discover-queries/ @getsentry/visibility
37-
# /src/docs/product/insights/ @getsentry/insights
38-
39-
# /src/docs/cli/dif.mdx @getsentry/owners-native
10+
# /docs/platforms/android/ @getsentry/team-mobile-core
11+
# /docs/platforms/apple/ @getsentry/team-mobile-core
12+
# /docs/platforms/dart/ @getsentry/team-mobile-cross-platform
13+
# /docs/platforms/react-native/ @getsentry/team-mobile-cross-platform
14+
# /docs/platforms/javascript/guides/cordova/ @getsentry/team-mobile-cross-platform
15+
16+
# /docs/platforms/dotnet/ @getsentry/gdx
17+
# /docs/platforms/godot/ @getsentry/gdx
18+
# /docs/platforms/nintendo-switch/ @getsentry/gdx
19+
# /docs/platforms/playstation/ @getsentry/gdx
20+
# /docs/platforms/powershell/ @getsentry/gdx
21+
# /docs/platforms/unity/ @getsentry/gdx
22+
# /docs/platforms/unreal/ @getsentry/gdx
23+
# /docs/platforms/xbox/ @getsentry/gdx
24+
25+
# /docs/platforms/java/ @getsentry/team-web-sdk-backend
26+
# /docs/platforms/native/ @getsentry/product-owners-sdks-native
27+
# /docs/platforms/rust/ @getsentry/team-web-sdk-backend
28+
29+
# /docs/product/explore/discover-queries/ @getsentry/visibility
30+
# /docs/product/insights/ @getsentry/insights
31+
32+
# /docs/cli/ @getsentry/team-web-sdk-backend
4033

4134
# /.github/labels.yml @getsentry/dev-infra
4235
# /.github/workflows/react-to-product-owners-yml-changes.yml @getsentry/dev-infra
43-
# /bin/react-to-product-owners-yml-changes.py @getsentry/dev-infra
44-
# /bin/react-to-product-owners-yml-changes.sh @getsentry/dev-infra
4536

4637
# ###### Replays #######
4738

48-
# /src/docs/product/session-replay/web @jas-kas @getsentry/replay-sdk-web @getsentry/replay-frontend @getsentry/replay-backend
49-
# /src/docs/product/session-replay/mobile @jas-kas @getsentry/replay-sdk-mobile @getsentry/replay-frontend @getsentry/replay-backend
50-
# /src/includes/session-replay-web-report-bug.mdx @getsentry/replay-sdk-web
51-
# /src/platform-includes/session-replay/ @getsentry/replay-sdk-web @getsentry/replay-sdk-mobile
52-
# /src/platforms/javascript/common/session-replay/ @getsentry/replay-sdk-web
39+
# /docs/product/explore/session-replay/web @jas-kas @getsentry/replay-sdk-web @getsentry/replay-frontend @getsentry/replay-backend
40+
# /docs/product/explore/session-replay/mobile @jas-kas @getsentry/replay-sdk-mobile @getsentry/replay-frontend @getsentry/replay-sdk-mobile
41+
# /includes/session-replay-web-report-bug.mdx @getsentry/replay-sdk-web
42+
# /platform-includes/session-replay/ @getsentry/replay-sdk-web @getsentry/replay-sdk-mobile
43+
# /docs/platforms/javascript/common/session-replay/ @getsentry/replay-sdk-web
5344

54-
# /src/docs/product/dev-toolbar/ @ryan953 @jas-kas
45+
# /docs/product/sentry-toolbar/ @ryan953 @jas-kas
5546

5647
# ###### End Replays #######

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ contact_links:
77
url: https://github.com/getsentry/self-hosted/issues/new
88
about: Please use the `self-hosted` repo for questions about self-hosted Sentry.
99
- name: An issue with one of the SDKs
10-
url: https://github.com/search?q=topic%3Acrash-reporting+org%3Agetsentry+fork%3Atrue
10+
url: https://github.com/search?q=topic%3Asdk+org%3Agetsentry&type=repositories
1111
about: Please use the relevant SDK repository to report any issues.

.github/ISSUE_TEMPLATE/issue-content-01-sdks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: '📝 SDK Documentation'
2-
labels: ['Type: Content', 'SDKs']
2+
labels: ['Docs', 'SDKs']
33
description: Missing, incorrect, or unclear documentation of SDKs.
4-
type: Improvement
54
body:
65
- type: markdown
76
attributes:

.github/ISSUE_TEMPLATE/issue-content-02-product.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: '📝 Product Documentation'
2-
labels: ['Type: Content', 'Product']
2+
labels: ['Docs', 'Product']
33
description: Missing, incorrect, or unclear documentation of product features.
4-
type: Improvement
54
body:
65
- type: markdown
76
attributes:

.github/ISSUE_TEMPLATE/issue-content-03-develop.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: '📝 Documentation on develop.sentry.dev'
2-
labels: ['Type: Content', 'Develop']
2+
labels: ['Docs', 'Develop']
33
description: Missing, incorrect, or unclear developer documentation.
4-
type: Improvement
54
body:
65
- type: markdown
76
attributes:

.github/ISSUE_TEMPLATE/issue-platform-404.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: '💻 Docs Platform: 🔗 404 Error'
2-
labels: 'Type: Platform,404'
2+
labels: ['Docs Platform', 'Bug', '404']
33
description: Broken links, missing pages, and other 404 errors.
4-
type: Bug
54
body:
65
- type: textarea
76
id: url

.github/ISSUE_TEMPLATE/issue-platform-bug.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: '💻 Docs Platform: 🐞 Bug'
2-
labels: 'Type: Platform'
3-
type: Bug
2+
labels: ['Docs Platform', 'Bug']
43
description: Problems with the technical platform of our docs.
54
body:
65
- type: textarea

.github/ISSUE_TEMPLATE/issue-platform-improvement.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: '💻 Docs Platform: ✨ Improvement'
2-
labels: 'Type: Platform'
2+
labels: ['Docs Platform', 'Improvement']
33
description: Ideas on how we can improve the technical capabilities of our docs platform.
4-
type: Improvement
54
body:
65
- type: textarea
76
id: problem

.github/workflows/algolia-index.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
DOCS_INDEX_NAME: ${{ secrets.DOCS_INDEX_NAME }}
4949
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
5050
NEXT_PUBLIC_ALGOLIA_SEARCH_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_SEARCH_KEY }}
51+
SENTRY_DSN: https://[email protected]/0
52+
NEXT_PUBLIC_SENTRY_DSN: https://[email protected]/0
5153

5254
- name: Build index for developer docs
5355
run: yarn build:developer-docs && bun ./scripts/algolia.ts
@@ -58,4 +60,6 @@ jobs:
5860
DOCS_INDEX_NAME: ${{ secrets.DEVELOP_DOCS_INDEX_NAME }}
5961
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
6062
NEXT_PUBLIC_ALGOLIA_SEARCH_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_SEARCH_KEY }}
63+
SENTRY_DSN: https://[email protected]/0
64+
NEXT_PUBLIC_SENTRY_DSN: https://[email protected]/0
6165
NEXT_PUBLIC_DEVELOPER_DOCS: 1
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Codeowner assignment
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
codeowner_assignment:
7+
name: Codeowner assignment
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/[email protected]
17+
id: token
18+
with:
19+
app-id: ${{ vars.CODEOWNER_ASSIGNMENT_GITHUB_APP_ID }}
20+
private-key: ${{ secrets.CODEOWNER_ASSIGNMENT_PRI_KEY }}
21+
owner: ${{ github.repository_owner }}
22+
repositories: |
23+
sentry-docs
24+
25+
- name: Parse CODEOWNERS and assign reviewers
26+
id: assign-reviewers
27+
env:
28+
PR_NUMBER: ${{ github.event.number }}
29+
GH_TOKEN: ${{ steps.token.outputs.token }}
30+
run: |
31+
# locate CODEOWNERS file exists
32+
if [[ -f .github/CODEOWNERS ]]; then
33+
codeowner_path=".github/CODEOWNERS"
34+
elif [[ -f CODEOWNERS ]]; then
35+
codeowner_path="CODEOWNERS"
36+
else
37+
echo "CODEOWNERS file not found, skipping."
38+
exit 0
39+
fi
40+
41+
# Get changed files in the PR
42+
CHANGED_FILES=$(gh pr view $PR_NUMBER --json files --jq '.files[].path')
43+
44+
echo "----------------------------------------"
45+
echo "Changed files:"
46+
echo "$CHANGED_FILES" | tr ' ' '\n' | sed 's/^/- /'
47+
echo "----------------------------------------"
48+
49+
# Get existing reviewers
50+
# merge reqeusted teams and users into a single array
51+
REQUESTED_REVIEWERS=$(gh pr view $PR_NUMBER --json reviewRequests --jq '[.reviewRequests[] | if .__typename == "Team" then .slug else .login end]')
52+
echo "Requested reviewers:"
53+
echo "$REQUESTED_REVIEWERS" | tr ' ' '\n' | sed 's/^/- /'
54+
echo "----------------------------------------"
55+
56+
# Parse CODEOWNERS and find commented lines
57+
# Add newline to the end of the file if it doesn't have one, otherwise sed will not read the last line
58+
sed -i -e '$a\' $codeowner_path
59+
60+
while read -r LINE; do
61+
# Skip lines that are not commented, GitHub will take care of un-commented lines
62+
if [[ ! "$LINE" =~ ^# ]]; then continue; fi
63+
64+
# Extract pattern and reviewer from the commented line
65+
PATTERN=$(echo "$LINE" | sed -E 's/^#\s*([^@]+).*$/\1/' | xargs)
66+
# Capture both individual users and GitHub teams reviewers that have "/" in the name
67+
REVIEWERS=$(echo "$LINE" | grep -o "@[a-zA-Z0-9_-]\+\(/[a-zA-Z0-9_-]\+\)\?" | tr '\n' ' ' | xargs)
68+
69+
# Skip if no reviewers found
70+
if [[ -z "$REVIEWERS" ]]; then
71+
continue
72+
fi
73+
74+
# Convert pattern to a regex for matching
75+
REGEX_PATTERN=$(echo "$PATTERN" | sed -e 's/\./\\./g' -e 's/\*/.*/g' -e 's/\?/./g' -e 's|^/||')
76+
77+
# Match changed files to the pattern
78+
for FILE in $CHANGED_FILES; do
79+
# For glob patterns(e.g. "**/"), use a different matching approach
80+
if [[ "$PATTERN" == *"*"* ]]; then
81+
# Special handling for **/ pattern
82+
if [[ "$PATTERN" == "**/"* ]]; then
83+
# Get the filename part after **/
84+
FILENAME=${PATTERN#**/}
85+
# Match either the filename directly or with any path prefix
86+
if [[ "$FILE" == "$FILENAME" ]] || [[ "$FILE" == */"$FILENAME" ]]; then
87+
echo "File $FILE matches glob pattern $PATTERN"
88+
# Assign each reviewer
89+
for REVIEWER in $REVIEWERS; do
90+
# Remove @ symbol from reviewer name
91+
REVIEWER_NAME=${REVIEWER#@}
92+
if [[ "$REQUESTED_REVIEWERS" == *"$REVIEWER_NAME"* ]]; then
93+
echo " - $REVIEWER_NAME is already a requested reviewer, skipping"
94+
else
95+
echo " - Assigning $REVIEWER_NAME to review changes in $FILE"
96+
gh pr edit $PR_NUMBER --add-reviewer "$REVIEWER_NAME"
97+
fi
98+
done
99+
fi
100+
else
101+
# Convert other glob patterns to regex for matching
102+
GLOB_PATTERN=$(echo "$PATTERN" | sed -e 's/\./\\./g' -e 's/\*/.*/g' -e 's/\?/./g')
103+
if [[ "$FILE" =~ $GLOB_PATTERN ]]; then
104+
echo "File $FILE matches glob pattern $PATTERN"
105+
# Assign each reviewer
106+
for REVIEWER in $REVIEWERS; do
107+
# Remove @ symbol from reviewer name
108+
REVIEWER_NAME=${REVIEWER#@}
109+
if [[ "$REQUESTED_REVIEWERS" == *"$REVIEWER_NAME"* ]]; then
110+
echo " - $REVIEWER_NAME is already a requested reviewer, skipping"
111+
else
112+
echo " - Assigning $REVIEWER_NAME to review changes in $FILE"
113+
gh pr edit $PR_NUMBER --add-reviewer "$REVIEWER_NAME"
114+
fi
115+
done
116+
fi
117+
fi
118+
else
119+
# Original directory matching logic
120+
if [[ "$FILE" == ${REGEX_PATTERN}* ]]; then
121+
echo "File $FILE matches pattern $PATTERN"
122+
# Assign each reviewer
123+
for REVIEWER in $REVIEWERS; do
124+
# Remove @ symbol from reviewer name
125+
REVIEWER_NAME=${REVIEWER#@}
126+
if [[ "$REQUESTED_REVIEWERS" == *"$REVIEWER_NAME"* ]]; then
127+
echo " - $REVIEWER_NAME is already a requested reviewer, skipping"
128+
else
129+
echo " - Assigning $REVIEWER_NAME to review changes in $FILE"
130+
gh pr edit $PR_NUMBER --add-reviewer "$REVIEWER_NAME"
131+
fi
132+
done
133+
fi
134+
fi
135+
done
136+
done < $codeowner_path
137+

0 commit comments

Comments
 (0)