1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Commit Graph

65 Commits

Author SHA1 Message Date
Grace Park
c5d08a7c19 Add -l option to curl code samples on rest pages to follow redirects (#35140) 2023-02-28 17:50:12 +00:00
Grace Park
320ffe6d01 Adding x-github-api-version header to js and cli examples (#34935) 2023-02-21 21:56:50 +00:00
Robert Sese
592ca1b51f only set query params if method isn't GET or HEAD (#34288) 2023-02-02 17:09:25 +00:00
Rachael Sewell
89e507215a account for non-object example values in rest docs (#33469)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-01-25 00:10:29 +00:00
Kevin Heis
1c0a9ef84d Add hover event, add scroll flips (#33743) 2023-01-04 22:02:39 +00:00
Rachael Sewell
2fd7e0f451 Revert "account for non-object example values in rest docs" (#33468) 2022-12-12 20:14:36 +00:00
Rachael Sewell
e78eb192df account for non-object example values in rest docs (#33411)
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
2022-12-12 19:22:10 +00:00
Rachael Sewell
2724fb7b2a add curl example for multipart form (#33378) 2022-12-09 19:34:22 +00:00
Grace Park
4103893460 Add x-github-api-version header to curl code examples (#33203) 2022-12-05 21:38:29 +00:00
Grace Park
a0536f8063 Add required query params to examples (#32248) 2022-11-10 21:17:34 +00:00
Kevin Heis
043e5842ec Record all links, add samesite field (#32163)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-10-28 20:47:34 +00:00
Evan Bonsignori
d5cf8700ab Persist tab state in query params for linking (#31499) 2022-10-12 11:43:31 +00:00
Rachael Sewell
93a3e80ede Fix REST example copy-paste error (#31043) 2022-09-26 18:47:55 +00:00
Manuel Bergler
219638d7d4 Fix Management Console API code samples (#30455) 2022-09-06 15:58:04 +00:00
Grace Park
e75e6d3638 Add new line for gh cli for REST CodeSamples to work (#30364) 2022-08-30 19:53:14 +00:00
Sarah Edwards
148257a793 Make autogenerated REST examples work with JWTs (#30352) 2022-08-29 17:32:34 +00:00
Kevin Heis
303d5190db Create a translations test suite (#30000)
* Scaffold files for migration

* Move user-agent into unit suite

* Nothing to move from browser suite

* Migrate tests to translations/content

* Migrate existing translation test to meta

* No graphql tests to migrate

* Migrate lint-translation-reporter

* Migrate lint-translation-reporter

* Remove languages-schema, unused

* Restore languages-schema

* Restore languages-schema

* Migrate rendering

* Migrate routing

* Migrate most of unit

* Remove dead files, comment out tests that aren't expected to work yet

* Migrate from get-redirect

* Migrate page and pages

* Migrate linting code

* Fix lint issues

* Found a few more

* Run prettier

* Move crowdin-config test and helper

* Update crowdin-config.js

* Remove translation linting, crowdin config lint, reduce file count

* Remove test that's been skipped for a year

* Restore linting with note to remove later

* Update lint-translation-reporter.js

* Clean up rendering suite

* Update rendering.js

* Remove excessive describe blocks

* Redirect tests

* Clean up unit

* Remove test that's never called

* Don't compare early access

* Rename test suites

* Update "content" tests

* Update files.js

* Update search.js

* Update files.js

* Update files.js
2022-08-25 12:38:03 -07:00
Kevin Heis
688a274f1f Remove CSRF check (#29910)
* Use color_mode for gating "sign up" button

* Remove csrf check

* Add `res.removeHeader('set-cookie')` to cache-control

* Update static-assets.js

* Remove package

* Remove tough-cookie

* Update cache-control.js

* Update cache-control.js

* Update cache-control.js
2022-08-15 19:28:42 +00:00
Grace Park
0426962aec Fix single quote escaping for curl examples (#29876)
fix single quote escaping for curl examples
2022-08-11 22:26:58 +00:00
Peter Bengtsson
ef277d6640 Always call initializeEvents with a truthy csrfToken (#29721) 2022-08-08 12:10:00 -04:00
Kevin Heis
56aa9ea094 Move use session to its own hook file (#29641)
* Move use session to its own hook file

* Trying useSWR

* Try one hour html cache

* blah blah lint

* Update to include loading state

* Update components/hooks/useSession.ts

Co-authored-by: Peter Bengtsson <peterbe@github.com>

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-08-05 14:47:10 +00:00
Kevin Heis
f8d2395960 Remove theme from HTML (#29560)
* Remove theme from HTML

* update for linting error

* Fix for overriding default color modes

Co-authored-by: Grace Park <lugraciecy@gmail.com>
Co-authored-by: Grace Park <gracepark@github.com>
2022-08-02 17:06:54 -07:00
Kevin Heis
6dcfab6338 Move waitForSession into get-session so its with family (and we are… (#29450)
Move `waitForSession` into get-session so its with family (and we are less likely to forget about it)
2022-07-29 16:24:29 +00:00
Kevin Heis
ccb9cd28e3 Fix lang dropdown (#29444)
* Let  be the caller, so events doesnt 403 on the first call

* Declare function

* Call all s so that the lang banner shows up consistently

* Update get-session.ts
2022-07-28 20:04:29 +00:00
Kevin Heis
9d0cb690a7 Let be the caller, so events doesnt 403 on the first call (#29441)
* Let  be the caller, so events doesnt 403 on the first call

* Declare function
2022-07-28 19:51:32 +00:00
Kevin Heis
e46b4d155f Call /api/session less (#29440) 2022-07-28 19:18:41 +00:00
Kevin Heis
0886faddac Move language context to browser/session (#29433) 2022-07-28 18:50:46 +00:00
Kevin Heis
f79e1d2cb7 Fetch CSRF token over XHR (browser-side) (#29337)
* Client side csrf token grab

* Update get-session.ts

* Update get-session.ts

* Update get-session.ts

* Remove test refs to meta tag

* Update get-session.ts

* Update get-session.ts

* Update get-session.ts

* Update get-session.ts

* Fix some type issues

* Simplify api

* Update components/lib/get-session.ts

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-07-27 16:18:07 +00:00
Kevin Heis
bb3cb78dd1 Move events under api (#29298) 2022-07-26 18:00:58 +00:00
Tim Rogers
037d6328b8 Recommend an Accept header without V3 in it when documenting our REST API operations (#28477)
* Recommend an `Accept` header for REST API requests which doesn't mention V3

In the documentation for every REST API, in the "Headers"
section, we say for the `Accept` header that:

> Setting to `application/vnd.github.v3+json` is recommended.

Putting the V3 bit in doesn't actually do anything - in fact,
a high proportion of API consumers don't do it - and this
recommendation is going to be confusing once we launch our
new API versioning. This recommends that people use
`application/vnd.gitrhub+json` instead.

We could just recommend `application/json` - I'd be in favour
of that! - but I'm trying to make this change as small as
possible.

* Update cURL and GitHub CLI code examples to use an `Accept` header without V3

Co-authored-by: Sarah Edwards <skedwards88@github.com>
2022-06-29 15:50:07 +00:00
Rachael Sewell
dd6e60242b add token to curl examples (#28357) 2022-06-09 15:36:57 +00:00
Grace Park
3a88ec5f1f Add curl -h authorization header to REST API Code Samples (#28332)
* add curl -h authorization header

* move to get-rest-code-samples
2022-06-08 20:06:48 +00:00
Robert Sese
2339bef120 Don't skip code term wrapping with single anchor child (#28175)
Wrap for single anchor child
2022-06-02 16:56:55 +00:00
Peter Bengtsson
a8d45acea9 refactor getThemeProps to be available in JS (#27439)
* refactor getThemeProps to be available in JS

* wip

* mike's idea

* delete no longer used file
2022-05-18 18:47:27 +00:00
Rachael Sewell
5f4f858b94 REST two-pane layout (#26954) 2022-05-02 10:10:33 -07:00
Robert Sese
2ee8aad472 Handle query parameters with PUT/POST operations (#26848)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2022-04-12 14:36:50 -05:00
Rachael Sewell
02dbebbef3 render existing openapi examples (#26405) 2022-04-11 16:09:03 +00:00
Grace Park
b16be00f3e adding copy button click event (#26074) 2022-03-09 15:55:17 -08:00
Mike Surowiec
1d42bbebb3 catch sendBeacon failures and console.warn (#24990) 2022-02-03 16:26:52 +00:00
Kevin Heis
e3b2e820fd React tool picker (#23004)
* Working on tool picker

* Start on react version of tool picker

* Update ToolPicker.tsx

* Update tool-switcher.html

* Get it working

* Update browser.js

* Update browser.js

* Update ToolPicker.tsx
2021-11-29 23:04:06 +00:00
Mike Surowiec
7310fc998a Refactor display-platform-specific-content (#22665)
* refactor display-platform-specific-content

* update PlatformPicker tests and cleanup
2021-11-12 14:40:35 +00:00
Kevin Heis
83804c7114 Create search result event (#22307)
* Create search result event

* Update Search.tsx

* actually send it

* remove comment

* Apply suggestions from code review

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

* add 'required' to schema

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2021-10-21 00:37:39 +00:00
Amy Burns
e82f64f642 Add vscode as an option for the application selector (#21798)
* adding switcher to creating a codespace guide

* adding additional switcher for vscode and updating codespaces name

* using webui in codespaces coontext

* updating internal documentation

* remove default tool

Co-authored-by: hubwriter <hubwriter@github.com>
2021-10-07 14:57:45 +01:00
Kevin Heis
12356c5bbb More client routing fixes (#21793)
* More client routing fixes

* Update index.tsx

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-09-29 16:08:31 -05:00
Kevin Heis
5fb28d1c9a Skip tracking page events when searching (#21726)
* Skip tracking page events when searching

* Update events.ts
2021-09-27 13:46:36 +00:00
Kevin Heis
ceb2106cab Update analytics to handle client side routing (#21719)
* Update analytics to handle client side routing

* Update events.ts
2021-09-24 17:21:52 +00:00
Kevin Heis
cdbbc63219 Send new analytics fields for path_language, path_version, path_product, path_article (#21562)
* Send new analytics fields for path_language, path_version, path_product, path_article

* Update DefaultLayout.tsx

* Update events.js
2021-09-17 19:22:54 +00:00
Kevin Heis
aef81ac477 Readd print tracking (#21180)
* Readd print button tracking

* Record all print events, not just button ones
2021-08-30 21:27:10 +00:00
Mike Surowiec
d76c16da19 Scope markdown body (#21082)
* update article content to markdown ui component

* decouple lunr indexing from class name

* remove summary outline none rule, apply utility class instead

* improve typing

* scope more styles down to markdown-body/extended-markdown

* move all markdown-body style overrides to MarkdownContent component

* fix class targeting within css module

* clean up MarkdownContent header style

* rename data-lunr to data-search

* fix: inline code color issue

* fix: update article markdown to work with MarkdownContent
2021-08-30 14:24:49 +00:00
Kevin Heis
4d0e9c70a3 Add new fields to analytics event context: status, page_type, page_document_type (#21115)
* Add new fields to analytics event context: status, page-type, page-document-type

* Update schema-event.js

* Typescript

* Add status meta to error pages

* Update DefaultLayout.tsx

* Update DefaultLayout.tsx

* Update building-and-testing-nodejs-or-python.tsx
2021-08-26 14:58:45 -07:00