Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unchanging github links in docs/comments #29545

Merged
merged 1 commit into from
Mar 11, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = defineConfig({
'react/react-in-jsx-scope': 'off', // not needed with new JSX transform
'react/self-closing-comp': 'error',

// recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js
// recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/v6.8.0/src/index.js#L46
'jsx-a11y/accessible-emoji': 'warn',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/label-has-associated-control': 'off',
Expand Down Expand Up @@ -176,7 +176,7 @@ module.exports = defineConfig({
},
],

// See https://github.com/import-js/eslint-plugin-import/blob/main/config/recommended.js
// See https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/config/recommended.js
'import/extensions': [
'error',
'always',
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ARG MASTODON_VERSION_METADATA=""
# See: https://docs.joinmastodon.org/admin/config/#rails_serve_static_files
ARG RAILS_SERVE_STATIC_FILES="true"
# Allow to use YJIT compiler
# See: https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md
# See: https://github.com/ruby/ruby/blob/v3_2_3/doc/yjit/yjit.md
ARG RUBY_YJIT_ENABLE="1"
# Timezone used by the Docker container and runtime, change with [--build-arg TZ=Europe/Berlin]
ARG TZ="Etc/UTC"
Expand Down
11 changes: 4 additions & 7 deletions config/initializers/open_redirects.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# frozen_string_literal: true

# TODO
# Starting with Rails 7.0, the framework default here is to set this true.
# However, we have a location in devise that redirects where we don't have an
# easy ability to override the method or set a config option, and where the
# redirect does not supply this option itself.
# https://github.com/heartcombo/devise/blob/v4.9.2/app/controllers/devise/confirmations_controller.rb#L28
# Once a solution is found, this line can be removed.
# TODO: Starting with Rails 7.0, the framework default is true for this setting.
# This location in devise redirects and we can't hook in or override:
# https://github.com/heartcombo/devise/blob/v4.9.3/app/controllers/devise/confirmations_controller.rb#L28
# When solution is found, this setting can go back to default.
Rails.application.config.action_controller.raise_on_open_redirects = false
3 changes: 2 additions & 1 deletion lib/mastodon/migration_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,8 @@ def check_trigger_permissions!(table)

private

# https://github.com/rails/rails/blob/v5.2.0/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb#L678-L684
# Private method copied from:
# https://github.com/rails/rails/blob/v7.1.3.2/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb#L974-L980
def extract_foreign_key_action(specifier)
case specifier
when 'c'; :cascade
Expand Down
2 changes: 1 addition & 1 deletion spec/config/initializers/rack/attack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def app
# to avoid crossing period boundaries.

# The code Rack::Attack uses to set periods is the following:
# https://github.com/rack/rack-attack/blob/v6.6.1/lib/rack/attack/cache.rb#L64-L66
# https://github.com/rack/rack-attack/blob/v6.7.0/lib/rack/attack/cache.rb#L70-L72
# So we want to minimize `Time.now.to_i % period`

travel_to Time.zone.at(counter_prefix * period.seconds)
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
inherit_from: ../../.rubocop.yml

# Anonymous controllers in specs cannot access described_class
# https://github.com/rubocop/rubocop-rspec/blob/master/lib/rubocop/cop/rspec/described_class.rb#L36-L39
# Anonymous controllers in specs cannot access `described_class`, explanation:
# https://github.com/rubocop/rubocop-rspec/blob/v2.26.1/lib/rubocop/cop/rspec/described_class.rb#L36-L56
RSpec/DescribedClass:
SkipBlocks: true