Skip to content

Commit ac58e31

Browse files
authored
Merge branch 'getsentry:master' into denrase/flutter-feature-flags
2 parents 4fcfdd2 + 70535cf commit ac58e31

File tree

247 files changed

+3405
-722
lines changed

Some content is hidden

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

247 files changed

+3405
-722
lines changed

.github/CODEOWNERS

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,41 @@
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/unity/ @getsentry/team-mobile-cross-platform
15+
# /docs/platforms/javascript/guides/cordova/ @getsentry/team-mobile-cross-platform
16+
17+
# /docs/platforms/dotnet/ @getsentry/team-mobile-cross-platform
18+
# /docs/platforms/java/ @getsentry/team-mobile-core
19+
20+
# /docs/platforms/native/ @getsentry/owners-native
21+
# /docs/platforms/rust/ @getsentry/owners-native
22+
23+
# /docs/product/explore/discover-queries/ @getsentry/visibility
24+
# /docs/product/insights/ @getsentry/insights
25+
26+
# /docs/cli/dif.mdx @getsentry/owners-native
4027

4128
# /.github/labels.yml @getsentry/dev-infra
4229
# /.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
4530

4631
# ###### Replays #######
4732

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
33+
# /docs/product/explore/session-replay/web @jas-kas @getsentry/replay-sdk-web @getsentry/replay-frontend @getsentry/replay-backend
34+
# /docs/product/explore/session-replay/mobile @jas-kas @getsentry/replay-sdk-mobile @getsentry/replay-frontend @getsentry/replay-backend
35+
# /includes/session-replay-web-report-bug.mdx @getsentry/replay-sdk-web
36+
# /platform-includes/session-replay/ @getsentry/replay-sdk-web @getsentry/replay-sdk-mobile
37+
# /docs/platforms/javascript/common/session-replay/ @getsentry/replay-sdk-web
5338

54-
# /src/docs/product/dev-toolbar/ @ryan953 @jas-kas
39+
# /docs/product/sentry-toolbar/ @ryan953 @jas-kas
5540

5641
# ###### 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
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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+
git fetch origin ${{ github.event.pull_request.base.ref }} \
43+
${{ github.event.pull_request.head.ref }}
44+
CHANGED_FILES=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }} \
45+
origin/${{ github.event.pull_request.head.ref }})
46+
47+
echo "----------------------------------------"
48+
echo "Changed files:"
49+
echo "$CHANGED_FILES" | tr ' ' '\n' | sed 's/^/- /'
50+
echo "----------------------------------------"
51+
52+
# Parse CODEOWNERS and find commented lines
53+
# Add newline to the end of the file if it doesn't have one, otherwise sed will not read the last line
54+
sed -i -e '$a\' $codeowner_path
55+
56+
while read -r LINE; do
57+
# Skip lines that are not commented, GitHub will take care of un-commented lines
58+
if [[ ! "$LINE" =~ ^# ]]; then continue; fi
59+
60+
# Extract pattern and reviewer from the commented line
61+
PATTERN=$(echo "$LINE" | sed -E 's/^#\s*([^@]+).*$/\1/' | xargs)
62+
# Capture both individual users and GitHub teams reviewers that have "/" in the name
63+
REVIEWERS=$(echo "$LINE" | grep -o "@[a-zA-Z0-9_-]\+\(/[a-zA-Z0-9_-]\+\)\?" | tr '\n' ' ' | xargs)
64+
65+
# Skip if no reviewers found
66+
if [[ -z "$REVIEWERS" ]]; then
67+
continue
68+
fi
69+
70+
# Convert pattern to a regex for matching
71+
REGEX_PATTERN=$(echo "$PATTERN" | sed -e 's/\./\\./g' -e 's/\*/.*/g' -e 's/\?/./g' -e 's|^/||')
72+
73+
# Match changed files to the pattern
74+
for FILE in $CHANGED_FILES; do
75+
# For glob patterns(e.g. "**/"), use a different matching approach
76+
if [[ "$PATTERN" == *"*"* ]]; then
77+
# Special handling for **/ pattern
78+
if [[ "$PATTERN" == "**/"* ]]; then
79+
# Get the filename part after **/
80+
FILENAME=${PATTERN#**/}
81+
# Match either the filename directly or with any path prefix
82+
if [[ "$FILE" == "$FILENAME" ]] || [[ "$FILE" == */"$FILENAME" ]]; then
83+
echo "File $FILE matches glob pattern $PATTERN"
84+
# Assign each reviewer
85+
for REVIEWER in $REVIEWERS; do
86+
# Remove @ symbol from reviewer name
87+
REVIEWER_NAME=${REVIEWER#@}
88+
echo " - Assigning $REVIEWER_NAME to review changes in $FILE"
89+
gh pr edit $PR_NUMBER --add-reviewer "$REVIEWER_NAME"
90+
done
91+
fi
92+
else
93+
# Convert other glob patterns to regex for matching
94+
GLOB_PATTERN=$(echo "$PATTERN" | sed -e 's/\./\\./g' -e 's/\*/.*/g' -e 's/\?/./g')
95+
if [[ "$FILE" =~ $GLOB_PATTERN ]]; then
96+
echo "File $FILE matches glob pattern $PATTERN"
97+
# Assign each reviewer
98+
for REVIEWER in $REVIEWERS; do
99+
# Remove @ symbol from reviewer name
100+
REVIEWER_NAME=${REVIEWER#@}
101+
echo " - Assigning $REVIEWER_NAME to review changes in $FILE"
102+
gh pr edit $PR_NUMBER --add-reviewer "$REVIEWER_NAME"
103+
done
104+
fi
105+
fi
106+
else
107+
# Original directory matching logic
108+
if [[ "$FILE" == ${REGEX_PATTERN}* ]]; then
109+
echo "File $FILE matches pattern $PATTERN"
110+
# Assign each reviewer
111+
for REVIEWER in $REVIEWERS; do
112+
# Remove @ symbol from reviewer name
113+
REVIEWER_NAME=${REVIEWER#@}
114+
echo " - Assigning $REVIEWER_NAME to review changes in $FILE"
115+
gh pr edit $PR_NUMBER --add-reviewer "$REVIEWER_NAME"
116+
done
117+
fi
118+
fi
119+
done
120+
done < $codeowner_path
121+

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Logs
2-
logs
32
*.log
43
npm-debug.log*
54
yarn-debug.log*

0 commit comments

Comments
 (0)