Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
# This is used by the action https://github.com/dorny/paths-filter

sentry_specific_workflow: &sentry_specific_workflow
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed, it's only used within the file

sentry_frontend_workflow_file: &sentry_frontend_workflow_file
- added|modified: '.github/workflows/frontend.yml'
sentry_specific_test_files: &sentry_specific_test_files
- added|modified: 'tests/js/**/*'
- added|deleted|modified: 'fixtures/search-syntax/**/*'
Comment on lines -5 to -7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inlined into the one callsite.


# Provides list of changed files to test (jest)
# getsentry/sentry does not use this directly, instead we shard tests inside jest.config.js
# getsentry/sentry does not use the list directly, instead we shard tests inside jest.config.js
testable_modified: &testable_modified
- '!**/*.generated.ts'
- added|modified: 'package.json'
- added|modified: 'static/**/*.[tj]{s,sx}'
- *sentry_specific_test_files
- added|modified: 'static/**/*.{ts,tsx,js,jsx,mjs}'
- added|modified: 'tests/js/**/*'
- added|deleted|modified: 'fixtures/search-syntax/**/*'

# Trigger for when we must run full tests (jest)
testable_rules_changed: &testable_rules_changed
- *sentry_specific_workflow
- *sentry_frontend_workflow_file
- added|modified: '.github/file-filters.yml'
- added|modified: 'jest.config.ts'

# Trigger whether to run tsc or not
# There's no "rules_changed" for this, because we run it for all files always
# getsentry/sentry does not use this directly, instead frontend_all is a superset to trigger tsc
typecheckable_rules_changed: &typecheckable_rules_changed
- *sentry_specific_workflow
- *sentry_frontend_workflow_file
- added|modified: '.github/file-filters.yml'
- added|deleted|modified: '**/tsconfig*.json'
- added|deleted|modified: 'static/**/*.[tj]{s,sx}'
- added|deleted|modified: 'static/**/*.{ts,tsx,js,jsx,mjs}'

# Trigger to apply the 'Scope: Frontend' label to PRs
frontend_all: &frontend_all
- *sentry_frontend_workflow_file
- '!**/*.generated.ts'
- added|modified: '**/*.{ts,tsx,js,jsx,mjs}'
- added|modified: 'static/**/*.{less,json,yml,md,mdx}'
- added|modified: '{.volta,vercel,tsconfig,biome,package}.json'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
# Map a step output to a job output
outputs:
testable_modified: ${{ steps.changes.outputs.testable_modified }}
testable_modified_files: ${{ steps.changes.outputs.testable_modified_files }}
testable_rules_changed: ${{ steps.changes.outputs.testable_rules_changed }}
typecheckable_rules_changed: ${{ steps.changes.outputs.typecheckable_rules_changed }}
frontend_all: ${{ steps.changes.outputs.frontend_all }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ repos:
stages: [pre-push]
entry: bash -c 'if [ -n "${SENTRY_KNIP_PRE_PUSH:-}" ]; then exec ./node_modules/.bin/knip; fi' --

- id: gen-ts-api-urls
name: gen-ts-api-urls
language: system
files: /urls\.py$
entry: python3 -m tools.api_urls_to_typescript

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand Down
3 changes: 0 additions & 3 deletions static/app/api/apiDefinition.ts

This file was deleted.

88 changes: 0 additions & 88 deletions static/app/api/getApiUrl.spec.ts

This file was deleted.

27 changes: 15 additions & 12 deletions static/app/components/waitingForEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {skipToken, useQuery} from '@tanstack/react-query';

import waitingForEventImg from 'sentry-images/spot/waiting-for-event.svg';

import {apiOptions} from 'sentry/api/apiOptions';
import {LinkButton} from 'sentry/components/core/button/linkButton';
import {Link} from 'sentry/components/core/link';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Organization} from 'sentry/types/organization';
import type {Project} from 'sentry/types/project';
import {apiOptions} from 'sentry/utils/api/apiOptions';
import CreateSampleEventButton from 'sentry/views/onboarding/createSampleEventButton';
import {makeProjectsPathname} from 'sentry/views/projects/pathname';

Expand All @@ -27,17 +27,20 @@ type Props = {

function WaitingForEvents({org, project, sampleIssueId: sampleIssueIdProp}: Props) {
const {data, error, isPending} = useQuery(
apiOptions.as<Array<{id: string}>>()('/projects/$orgSlug/$projectSlug/issues/', {
staleTime: Infinity,
data: {limit: 1},
path:
project && sampleIssueIdProp === undefined
? {
orgSlug: org.slug,
projectSlug: project.slug,
}
: skipToken,
})
apiOptions.as<Array<{id: string}>>()(
'/projects/$organizationIdOrSlug/$projectIdOrSlug/issues/',
{
staleTime: Infinity,
data: {limit: 1},
path:
project && sampleIssueIdProp === undefined
? {
organizationIdOrSlug: org.slug,
projectIdOrSlug: project.slug,
}
: skipToken,
}
)
);

const sampleIssueId = sampleIssueIdProp ?? data?.[0]?.id ?? '';
Expand Down
Loading
Loading