* Use [node-]redis as a direct dependency
* Extract Redis client creation to its own module
* Attach extensive logging in the Redis client creation module
* Allow the rate limiter to pass requests when Redis is disconnected
* Update rate-limit-redis
* Default error input to empty object for formatRedisError method
* Provide a name for the rate limiter's Redis client
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
* Install throng for easy cluster management
* Extract the Express app construction into its own file
* Switch server.js to use app clustering for deployed environments
* Worker count is based on the lesser of process.env.WEB_CONCURRENCY and the count of CPUs
* Reading clustered output is difficult, let's prefix the std{out,err} streams
Co-authored-by: Jason Etcovitch <jasonetco@github.com>
* Add middleware to timeout requests after a period
* Add halt-on-dropped-connection middleware to stop the middleware processing stack if the connection was already dropped
* Add a few strategic bail-out spots for dropped connections during the render-page middleware
* Handle 404s and HEAD requests earlier in the page rendering flow
* Add a few more strategic bail-out spots for dropped connections during the render-page middleware
* Add middleware to notice aborted requests
* Add a check for aborted requests into the isConnectionDropped logic
* Reformat comment for consistency
* Handle aborted requests correctly in the error handler
* Explicit returns for consistency
* Install liquidjs, uninstall liquid
* Comment a bunch of stuff out to get going
* Fix invalid includes
* Fix all includes (path => 'path')
* Get the homepage to render
* Do link-in-list kinda
* Revert "Fix all includes (path => 'path')"
This reverts commit d6fead646353aa5041d9229470a62a1d487456b9.
* Support non-dynamic partials
* Extract getTemplate helper
* Do remaining custom Liquid tags
* Fix some custom tag bugs
* Moar bugs
* Re-add link tag
* Cleaner diff
* Actually fix extended markdown tags
* Fully comment out version matchers
* Smaller diff
* Rely only on Liquid internals for conditionals
* Use new operators option in Liquid engine
* Fix link.js
* Don't need options
* Updoot to the right doot
* Fix some bugs
* Fix another bug
* Pass a test
* Fix the translate bits
* Adjust a test
* Fix another invalid Liquid bug
* Two more borked translations
* Found some more
* Don't need this change
* Revert "Don't need this change"
This reverts commit a916d619747f0492865a69c3e237c97c4d4e7fad.
* This should fix the broken links
* Missed one
* Revert "This should fix the broken links"
This reverts commit e6c2cc0d9055d958706260d57edbe293281c150e.
* Revert "Missed one"
This reverts commit bbe1f23baf16e020f6f7931589decb1afc75dfbd.
* Updoot liquidjs
### Why:
A lot of content gets mistranslated, some common patterns are: frontmatter date and enums getting translated, liquid tags get translated or go missing during the translation process. These translation errors are tough to catch, especially when they often come in huge PRs.
### What's being changed:
- Frontmatter is also getting linted against schema as part of `lint-files`
- When an environment variable `TEST_TRANSLATION` is passed,
- `lint-files` will run its tests against all files that have been newly translated (by git-diffing between `translations` branch and `main` branch), and
- results are outputted using a custom jest reporter. The output is formatted in a way that makes it easy to exclude the problematic translated files from being merged, and to share the errors with [localization support](https://github.com/github/localization-support/issues/489).
- Run the implemented translation test as part of the existing `Node.js Tests - Translations` workflow
* Write our plugin
* Include it
* Move the RegEx
* Don't rewriteLocalLinks with cheerio anymore
* Process after HTML ast is generated
* Use the same logic as before, just to see if it'll pass
* Don't require languageCode/version
* Only work on local links
* Needs an href
* Only update href if there's a new one to use
* Check for node.properties
* Some links are just mean
* Move use-english-headings to be a plugin
* Bail if no englishHeadings were passed
* Install rehype-wrap
* Wrap ol > li img in div.procedural-image-wrapper
* Test for platform without cheerio
* Use a plugin for rewriteAssetPathsToS3
* Remove cheerio from page.render
* Fix require paths
* SImplify
* Fix some 🐛s
* Use our own rehype-wrap
* Move rewriteAssetPathsToS3 after HTML AST
* Remove some console logs
* Fix check for includesPlatformSpecificContent
* Rename ast => tree
* Uninstall hubdown, install unified deps
* Create create-processor
* Use it
* Update a doc
* Tweak the language
* Use the same versions that hubdown used
* Add Lunr as a site search option
* Use a class like the Algolia option does
* Lint
* Working on showing real content, prep for highlighting
* Move searching to their own files
* Split out ridiculous fn
* Add highlighting
* Less lunr search code
* A little more tidy
* Then chain on write too
* Mark from server too
* Write a batch of indices
* Update compress.js
* Highlighting with fewer calls
* Update lunr-search.js
* Update lunr-search.js
* Update lunr-search.js
* Update lunr-search.js
* Update lunr-search.js
* Update lunr-search.js
* Add markdown parsing dependencies
* Use it for the link test
* Use ast tests for hard-coded language
* Dedupe visiting for links
* Add new mdast utils to check-deps exclusions
* Move site search to use an endpoint
* Update browser.js
* Update search.js
* Update lib/search/versions.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Fix URLs
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Explicitly set the Redis database number used for rate limiting
* Switch to using ioredis as the Redis client for rate limiting
* Install ioredis-mock as a primary dependency
* Create a Redis BasicAccessor class and tests
* Switch rendered page caching to use Redis for storage
* Add support for additional Redis SET options like TTLs
* Remove currently unused methods
* Rename redis-accessors/basic to redis-accessor and remove extra fluff
* Change default behavior for cache setting to throw if an error occurs
Add option allowSetFailures to facilitate graceful failures
* Allow SET failures to fail gracefully for the rendered page cache
* Remove as-yet unneeded serialization options from RedisAccessor
* Move Redis client construction into RedisAccessor constructor, just pass in databaseNumber as option
* Remove rendered-page-cache in favor of direct RedisAccessor use
* Add tests for RedisAccessor constructor param validations
* Eliminate one roundtrip to Redis for the cached HTML existence check
Are we fast yet?
* Set a rendered page cache TTL of 24 hours
* npm i connect-datadog
* Add connectDatadog middleware
* Add comments
* Use DD_API_KEY to gate
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
* Update README
* create structure for discussions landing page
* is everything broken
* [Universe] Dark mode (#16545)
* Fix title
* Add Discussions product
* Correct title
* Correct title
* Move quickstart article
* Move quickstart back out into article
* Add and incorporate reusables
* Move information about search
* Draft conceptual information
* Draft best practices
* Draft further reading
* Draft product introduction
* Draft introduction
* Add author metadata
* Pluralize
* Fix typos
* Add introduction
* Bump Octicons
* Add some reusables
* Add images
* Revise article
* Draft article
* Change word
* 🔪 the gerund
* Add reusable
* Revise introduction
* Revise list
* Simplify
* Revise reusable
* Fix reusable; add context
* Rename reusable
* Deduplicate conceptual information
* 🔪 gerund
* Add link to further reading
* Move link and dispose of tip
* Delete space
* Add images
* Add conceptual section
* Add word
* Delete newline
* Revert package.json to state on main
* Tweak images
* Draft article
* Add product name
* Remove beta note
* Use product name for future-proofing
* Begin adding search information
* Fix copypasta
* little edits
* build out a bit more of the guides content
* Don't mention integrations for now
* Escape quote
* Remove authorship information for new defaults
* Finish drafting article
* Replace encoded character to match description
* Revise away inline link
* Accommodate 'for more information' in reusable
* Fix links
* Fix one last bit of copypasta
* Update indices
* Temporarily remove heading
* Update introduction
* Add new article 💀
* Remove commits from universe-2020-megabranch
* Add article 💀
* update with a very rough draft
* Add content about collaboration options to "About repositories"
* Add content about discussions to "About issues"
* Reorder content
* Add is:discussion query
* update with a few mmore fleshed out sections
* update with more structure
* Add reusable
* Add screenshots
* Clear way for actual procedural
* Discussions landing page "Communities" section (#16692)
* Make button Overview-able
* Make card filtering more extensible
* Guard for missing attributes
* Use arbitrary dataset attributes
* Add section with discussions-community-card
* Tweak show more button behavior
* Conditionally show "Show more"
* Add beta_product frontmatter/label
* Remove beta callout note
* Hide changelog with no items
* Finish importing community info
* Fix borked markup
* Omit search abr
* Two columns should actually be two columns
* Use org image, change card layout
* Add two more examples
* Fix title
* Escape quote
* Escape another quote
* Draft article
* Lower case
* Relocate conceptual information
* Update qualifier name
* Draft article
* Add conceptual information and links
* Remove duplicative section
* Fix copypasta
* Revise reusable
* Update link
* Add content on categories
* Lint the discussions YAML file
* Update introduction and permissions
* ⚓
* Reusablize; fix link
* more planning content stuff
* Escape quotes
* Align prerequisites
* Soften
* Clean up prerequisites
* Fix titles; version; add screenshot
* Fix links
* Actually fix links
* Use better variable
* Mention pinning
* Update screenshots
* Add screenshot
* forgot to committ
* update with reusable
* add that screenshot
* beef up landing page a bit
* remove extra space
* messed that up
* fix hardcoded linkks weirdo
* fix tests
* update with permissions content
* update with placeholder
* filter out standalone category files from test
* update
* update @becca's ⚡ feedback
* update with more feedback
* so many updates
* fix links
* fix some more tests
* flesh some more things out
* update with further reading blah blah
* fix some things
* remove the gate-features label for beta ship only
* Add discussions video to product landing page (#16759)
* Add discussions video placeholder
* This might work maybe
* fix tests
* apply all of @becca's and @lecoursen's ⚡ feedback ❤️
* rename to fix test
* Revert "Add discussions video to product landing page (#16759)"
This reverts commit 2247e5d0881ca6b36cee421218e8341a7cc12ac7.
* update with test fix
Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Jason Etcovitch <jasonetco@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
* chore: Move standard to ESLint config
* fix: auto-fix ESLint indent issues
* fix: ESLint prefer-regex-literals
* fix: ESLint array-callback-return
- .filter must return a boolean value
- .map replaced with forEach when the value isn't used
* fix: ESLint no-extra-semi
Related to #128
- Prettier to fix indenting/quoting across files
- Manually adjust list styles to "-" style
- Ignore all translated files from automated formatting
- Drop redundant CI env variable
* add linkinator npm package
* add new script that uses Linkinator
* reorg the excluded links file and update comments
* replace blc artifacts with linkinator artifacts in .gitignore
* update the scheduled workflow to use the new script
* dismantle BLC scripts
* add workflow_dispatch event so we can test this manually
* npm uninstall broken-link-checker
* use different exit codes depending on whether broken links are found
* Add new section for Actions permissions API
* Add description for new 'Permissions' section
* Apply suggestions from code review
* add latest rest-api-operations module
Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
* set engines.node to >=12
* set engines.node to >=12
* Update node-versions.md
* update Node.js version in Actions workflows
* Update .node-version
* Update references to Node.js version from 12 to 14
* Update Dockerfile to use Node.js 14
* set engines.node to safe "12 - 14" range
* Add back changes from prior to purge
* Manually fix some invalid Liquid
* Updoot render-content
* Improve test messages to show correct output
* Run el scripto
* Pass the remaining test