mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Compare commits
1 Commits
glitch-soc
...
199-add-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
083f78b8fb |
66
.babelrc
Normal file
66
.babelrc
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"react",
|
||||||
|
[
|
||||||
|
"env",
|
||||||
|
{
|
||||||
|
"exclude": ["transform-async-to-generator", "transform-regenerator"],
|
||||||
|
"loose": true,
|
||||||
|
"modules": false,
|
||||||
|
"targets": {
|
||||||
|
"browsers": ["last 2 versions", "IE >= 11", "iOS >= 9"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"syntax-dynamic-import",
|
||||||
|
["transform-object-rest-spread", { "useBuiltIns": true }],
|
||||||
|
"transform-decorators-legacy",
|
||||||
|
"transform-class-properties",
|
||||||
|
[
|
||||||
|
"react-intl",
|
||||||
|
{
|
||||||
|
"messagesDir": "./build/messages"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preval"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"development": {
|
||||||
|
"plugins": [
|
||||||
|
"transform-react-jsx-source",
|
||||||
|
"transform-react-jsx-self"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"production": {
|
||||||
|
"plugins": [
|
||||||
|
"lodash",
|
||||||
|
[
|
||||||
|
"transform-react-remove-prop-types",
|
||||||
|
{
|
||||||
|
"mode": "remove",
|
||||||
|
"removeImport": true,
|
||||||
|
"additionalLibraries": [
|
||||||
|
"react-immutable-proptypes"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"transform-react-inline-elements",
|
||||||
|
[
|
||||||
|
"transform-runtime",
|
||||||
|
{
|
||||||
|
"helpers": true,
|
||||||
|
"polyfill": false,
|
||||||
|
"regenerator": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"plugins": [
|
||||||
|
"transform-es2015-modules-commonjs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[production]
|
|
||||||
defaults
|
|
||||||
not IE 11
|
|
||||||
not dead
|
|
||||||
|
|
||||||
[development]
|
|
||||||
supports es6-module
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
https://github.com/heroku/heroku-buildpack-apt
|
https://github.com/heroku/heroku-buildpack-apt
|
||||||
https://github.com/Scalingo/ffmpeg-buildpack
|
https://github.com/Scalingo/nodejs-buildpack
|
||||||
https://github.com/Scalingo/ruby-buildpack
|
https://github.com/Scalingo/ruby-buildpack
|
||||||
|
|||||||
193
.circleci/config.yml
Normal file
193
.circleci/config.yml
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
aliases:
|
||||||
|
- &defaults
|
||||||
|
docker:
|
||||||
|
- image: circleci/ruby:2.5.1-stretch-node
|
||||||
|
environment: &ruby_environment
|
||||||
|
BUNDLE_APP_CONFIG: ./.bundle/
|
||||||
|
DB_HOST: localhost
|
||||||
|
DB_USER: root
|
||||||
|
RAILS_ENV: test
|
||||||
|
PARALLEL_TEST_PROCESSORS: 4
|
||||||
|
ALLOW_NOPAM: true
|
||||||
|
CONTINUOUS_INTEGRATION: true
|
||||||
|
DISABLE_SIMPLECOV: true
|
||||||
|
working_directory: ~/projects/mastodon/
|
||||||
|
|
||||||
|
- &attach_workspace
|
||||||
|
attach_workspace:
|
||||||
|
at: ~/projects/
|
||||||
|
|
||||||
|
- &persist_to_workspace
|
||||||
|
persist_to_workspace:
|
||||||
|
root: ~/projects/
|
||||||
|
paths:
|
||||||
|
- ./mastodon/
|
||||||
|
|
||||||
|
- &restore_ruby_dependencies
|
||||||
|
restore_cache:
|
||||||
|
keys:
|
||||||
|
- v2-ruby-dependencies-{{ checksum "/tmp/.ruby-version" }}-{{ checksum "Gemfile.lock" }}
|
||||||
|
- v2-ruby-dependencies-{{ checksum "/tmp/.ruby-version" }}-
|
||||||
|
- v2-ruby-dependencies-
|
||||||
|
|
||||||
|
- &install_steps
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- *attach_workspace
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- v1-node-dependencies-{{ checksum "yarn.lock" }}
|
||||||
|
- v1-node-dependencies-
|
||||||
|
- run: yarn install --frozen-lockfile
|
||||||
|
- save_cache:
|
||||||
|
key: v1-node-dependencies-{{ checksum "yarn.lock" }}
|
||||||
|
paths:
|
||||||
|
- ./node_modules/
|
||||||
|
|
||||||
|
- *persist_to_workspace
|
||||||
|
|
||||||
|
- &install_system_dependencies
|
||||||
|
run:
|
||||||
|
name: Install system dependencies
|
||||||
|
command: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libicu-dev libidn11-dev libprotobuf-dev protobuf-compiler
|
||||||
|
|
||||||
|
- &install_ruby_dependencies
|
||||||
|
steps:
|
||||||
|
- *attach_workspace
|
||||||
|
|
||||||
|
- *install_system_dependencies
|
||||||
|
|
||||||
|
- run: ruby -e 'puts RUBY_VERSION' | tee /tmp/.ruby-version
|
||||||
|
- *restore_ruby_dependencies
|
||||||
|
- run: bundle install --clean --jobs 16 --path ./vendor/bundle/ --retry 3 --with pam_authentication --without development production
|
||||||
|
- save_cache:
|
||||||
|
key: v2-ruby-dependencies-{{ checksum "/tmp/.ruby-version" }}-{{ checksum "Gemfile.lock" }}
|
||||||
|
paths:
|
||||||
|
- ./.bundle/
|
||||||
|
- ./vendor/bundle/
|
||||||
|
|
||||||
|
- &test_steps
|
||||||
|
steps:
|
||||||
|
- *attach_workspace
|
||||||
|
|
||||||
|
- *install_system_dependencies
|
||||||
|
- run: sudo apt-get install -y ffmpeg
|
||||||
|
|
||||||
|
- run: ruby -e 'puts RUBY_VERSION' | tee /tmp/.ruby-version
|
||||||
|
- *restore_ruby_dependencies
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- precompiled-assets-{{ .Branch }}-{{ .Revision }}
|
||||||
|
- precompiled-assets-{{ .Branch }}-
|
||||||
|
- precompiled-assets-
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Prepare Tests
|
||||||
|
command: ./bin/rails parallel:create parallel:load_schema parallel:prepare
|
||||||
|
- run:
|
||||||
|
name: Run Tests
|
||||||
|
command: ./bin/retry bundle exec parallel_test ./spec/ --group-by filesize --type rspec
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
install:
|
||||||
|
<<: *defaults
|
||||||
|
<<: *install_steps
|
||||||
|
|
||||||
|
install-ruby2.5:
|
||||||
|
<<: *defaults
|
||||||
|
<<: *install_ruby_dependencies
|
||||||
|
|
||||||
|
install-ruby2.4:
|
||||||
|
<<: *defaults
|
||||||
|
docker:
|
||||||
|
- image: circleci/ruby:2.4.4-stretch-node
|
||||||
|
environment: *ruby_environment
|
||||||
|
<<: *install_ruby_dependencies
|
||||||
|
|
||||||
|
build:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- *attach_workspace
|
||||||
|
- *install_system_dependencies
|
||||||
|
- run: ruby -e 'puts RUBY_VERSION' | tee /tmp/.ruby-version
|
||||||
|
- *restore_ruby_dependencies
|
||||||
|
- run: ./bin/rails assets:precompile
|
||||||
|
- save_cache:
|
||||||
|
key: precompiled-assets-{{ .Branch }}-{{ .Revision }}
|
||||||
|
paths:
|
||||||
|
- ./public/assets
|
||||||
|
- ./public/packs-test/
|
||||||
|
|
||||||
|
test-ruby2.5:
|
||||||
|
<<: *defaults
|
||||||
|
docker:
|
||||||
|
- image: circleci/ruby:2.5.1-stretch-node
|
||||||
|
environment: *ruby_environment
|
||||||
|
- image: circleci/postgres:10.3-alpine
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: root
|
||||||
|
- image: circleci/redis:4.0.9-alpine
|
||||||
|
<<: *test_steps
|
||||||
|
|
||||||
|
test-ruby2.4:
|
||||||
|
<<: *defaults
|
||||||
|
docker:
|
||||||
|
- image: circleci/ruby:2.4.4-stretch-node
|
||||||
|
environment: *ruby_environment
|
||||||
|
- image: circleci/postgres:10.3-alpine
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: root
|
||||||
|
- image: circleci/redis:4.0.9-alpine
|
||||||
|
<<: *test_steps
|
||||||
|
|
||||||
|
test-webui:
|
||||||
|
<<: *defaults
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:8.11.1-stretch
|
||||||
|
steps:
|
||||||
|
- *attach_workspace
|
||||||
|
- run: ./bin/retry yarn test:jest
|
||||||
|
|
||||||
|
check-i18n:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- *attach_workspace
|
||||||
|
- run: ruby -e 'puts RUBY_VERSION' | tee /tmp/.ruby-version
|
||||||
|
- *restore_ruby_dependencies
|
||||||
|
- run: bundle exec i18n-tasks check-normalized
|
||||||
|
- run: bundle exec i18n-tasks unused
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build-and-test:
|
||||||
|
jobs:
|
||||||
|
- install
|
||||||
|
- install-ruby2.5:
|
||||||
|
requires:
|
||||||
|
- install
|
||||||
|
- install-ruby2.4:
|
||||||
|
requires:
|
||||||
|
- install
|
||||||
|
- build:
|
||||||
|
requires:
|
||||||
|
- install-ruby2.5
|
||||||
|
- test-ruby2.5:
|
||||||
|
requires:
|
||||||
|
- install-ruby2.5
|
||||||
|
- build
|
||||||
|
- test-ruby2.4:
|
||||||
|
requires:
|
||||||
|
- install-ruby2.4
|
||||||
|
- build
|
||||||
|
- test-webui:
|
||||||
|
requires:
|
||||||
|
- install
|
||||||
|
- check-i18n:
|
||||||
|
requires:
|
||||||
|
- install-ruby2.5
|
||||||
38
.codeclimate.yml
Normal file
38
.codeclimate.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
version: "2"
|
||||||
|
checks:
|
||||||
|
argument-count:
|
||||||
|
enabled: false
|
||||||
|
complex-logic:
|
||||||
|
enabled: false
|
||||||
|
file-lines:
|
||||||
|
enabled: false
|
||||||
|
method-complexity:
|
||||||
|
enabled: false
|
||||||
|
method-count:
|
||||||
|
enabled: false
|
||||||
|
method-lines:
|
||||||
|
enabled: false
|
||||||
|
nested-control-flow:
|
||||||
|
enabled: false
|
||||||
|
return-statements:
|
||||||
|
enabled: false
|
||||||
|
similar-code:
|
||||||
|
enabled: false
|
||||||
|
identical-code:
|
||||||
|
enabled: false
|
||||||
|
plugins:
|
||||||
|
brakeman:
|
||||||
|
enabled: true
|
||||||
|
bundler-audit:
|
||||||
|
enabled: true
|
||||||
|
eslint:
|
||||||
|
enabled: true
|
||||||
|
channel: eslint-4
|
||||||
|
rubocop:
|
||||||
|
enabled: true
|
||||||
|
channel: rubocop-0-54
|
||||||
|
scss-lint:
|
||||||
|
enabled: true
|
||||||
|
exclude_patterns:
|
||||||
|
- spec/
|
||||||
|
- vendor/asset
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# For details, see https://github.com/devcontainers/images/tree/main/src/ruby
|
|
||||||
FROM mcr.microsoft.com/devcontainers/ruby:1-3.2-bullseye
|
|
||||||
|
|
||||||
# Install Rails
|
|
||||||
# RUN gem install rails webdrivers
|
|
||||||
|
|
||||||
ARG NODE_VERSION="20"
|
|
||||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
|
||||||
|
|
||||||
# [Optional] Uncomment this section to install additional OS packages.
|
|
||||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
&& apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libpam-dev
|
|
||||||
|
|
||||||
# [Optional] Uncomment this line to install additional gems.
|
|
||||||
RUN gem install foreman
|
|
||||||
|
|
||||||
# [Optional] Uncomment this line to install global node packages.
|
|
||||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && corepack enable" 2>&1
|
|
||||||
|
|
||||||
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Mastodon on GitHub Codespaces",
|
|
||||||
"dockerComposeFile": "../docker-compose.yml",
|
|
||||||
"service": "app",
|
|
||||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
|
||||||
|
|
||||||
"features": {
|
|
||||||
"ghcr.io/devcontainers/features/sshd:1": {}
|
|
||||||
},
|
|
||||||
|
|
||||||
"runServices": ["app", "db", "redis"],
|
|
||||||
|
|
||||||
"forwardPorts": [3000, 4000],
|
|
||||||
|
|
||||||
"portsAttributes": {
|
|
||||||
"3000": {
|
|
||||||
"label": "web",
|
|
||||||
"onAutoForward": "notify"
|
|
||||||
},
|
|
||||||
"4000": {
|
|
||||||
"label": "stream",
|
|
||||||
"onAutoForward": "silent"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"otherPortsAttributes": {
|
|
||||||
"onAutoForward": "silent"
|
|
||||||
},
|
|
||||||
|
|
||||||
"remoteEnv": {
|
|
||||||
"LOCAL_DOMAIN": "${localEnv:CODESPACE_NAME}-3000.app.github.dev",
|
|
||||||
"LOCAL_HTTPS": "true",
|
|
||||||
"STREAMING_API_BASE_URL": "https://${localEnv:CODESPACE_NAME}-4000.app.github.dev",
|
|
||||||
"DISABLE_FORGERY_REQUEST_PROTECTION": "true",
|
|
||||||
"ES_ENABLED": "",
|
|
||||||
"LIBRE_TRANSLATE_ENDPOINT": ""
|
|
||||||
},
|
|
||||||
|
|
||||||
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
|
|
||||||
"postCreateCommand": ".devcontainer/post-create.sh",
|
|
||||||
"waitFor": "postCreateCommand",
|
|
||||||
|
|
||||||
"customizations": {
|
|
||||||
"vscode": {
|
|
||||||
"settings": {},
|
|
||||||
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Mastodon on local machine",
|
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
|
||||||
"service": "app",
|
|
||||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
|
||||||
|
|
||||||
"features": {
|
|
||||||
"ghcr.io/devcontainers/features/sshd:1": {}
|
|
||||||
},
|
|
||||||
|
|
||||||
"forwardPorts": [3000, 4000],
|
|
||||||
|
|
||||||
"portsAttributes": {
|
|
||||||
"3000": {
|
|
||||||
"label": "web",
|
|
||||||
"onAutoForward": "notify",
|
|
||||||
"requireLocalPort": true
|
|
||||||
},
|
|
||||||
"4000": {
|
|
||||||
"label": "stream",
|
|
||||||
"onAutoForward": "silent",
|
|
||||||
"requireLocalPort": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"otherPortsAttributes": {
|
|
||||||
"onAutoForward": "silent"
|
|
||||||
},
|
|
||||||
|
|
||||||
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
|
|
||||||
"postCreateCommand": ".devcontainer/post-create.sh",
|
|
||||||
"waitFor": "postCreateCommand",
|
|
||||||
|
|
||||||
"customizations": {
|
|
||||||
"vscode": {
|
|
||||||
"settings": {},
|
|
||||||
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
volumes:
|
|
||||||
- ../..:/workspaces:cached
|
|
||||||
environment:
|
|
||||||
RAILS_ENV: development
|
|
||||||
NODE_ENV: development
|
|
||||||
BIND: 0.0.0.0
|
|
||||||
REDIS_HOST: redis
|
|
||||||
REDIS_PORT: '6379'
|
|
||||||
DB_HOST: db
|
|
||||||
DB_USER: postgres
|
|
||||||
DB_PASS: postgres
|
|
||||||
DB_PORT: '5432'
|
|
||||||
ES_ENABLED: 'true'
|
|
||||||
ES_HOST: es
|
|
||||||
ES_PORT: '9200'
|
|
||||||
LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
|
|
||||||
# Overrides default command so things don't shut down after the process ends.
|
|
||||||
command: sleep infinity
|
|
||||||
ports:
|
|
||||||
- '127.0.0.1:3000:3000'
|
|
||||||
- '127.0.0.1:3035:3035'
|
|
||||||
- '127.0.0.1:4000:4000'
|
|
||||||
networks:
|
|
||||||
- external_network
|
|
||||||
- internal_network
|
|
||||||
|
|
||||||
db:
|
|
||||||
image: postgres:14-alpine
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- postgres-data:/var/lib/postgresql/data
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_DB: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:7-alpine
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- redis-data:/data
|
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
|
|
||||||
es:
|
|
||||||
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
ES_JAVA_OPTS: -Xms512m -Xmx512m
|
|
||||||
cluster.name: es-mastodon
|
|
||||||
discovery.type: single-node
|
|
||||||
bootstrap.memory_lock: 'true'
|
|
||||||
volumes:
|
|
||||||
- es-data:/usr/share/elasticsearch/data
|
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
ulimits:
|
|
||||||
memlock:
|
|
||||||
soft: -1
|
|
||||||
hard: -1
|
|
||||||
|
|
||||||
libretranslate:
|
|
||||||
image: libretranslate/libretranslate:v1.5.2
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- lt-data:/home/libretranslate/.local
|
|
||||||
networks:
|
|
||||||
- external_network
|
|
||||||
- internal_network
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
postgres-data:
|
|
||||||
redis-data:
|
|
||||||
es-data:
|
|
||||||
lt-data:
|
|
||||||
|
|
||||||
networks:
|
|
||||||
external_network:
|
|
||||||
internal_network:
|
|
||||||
internal: true
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e # Fail the whole script on first error
|
|
||||||
|
|
||||||
# Fetch Ruby gem dependencies
|
|
||||||
bundle config path 'vendor/bundle'
|
|
||||||
bundle config with 'development test'
|
|
||||||
bundle install
|
|
||||||
|
|
||||||
# Make Gemfile.lock pristine again
|
|
||||||
git checkout -- Gemfile.lock
|
|
||||||
|
|
||||||
# Fetch Javascript dependencies
|
|
||||||
corepack prepare
|
|
||||||
yarn install --immutable
|
|
||||||
|
|
||||||
# [re]create, migrate, and seed the test database
|
|
||||||
RAILS_ENV=test ./bin/rails db:setup
|
|
||||||
|
|
||||||
# [re]create, migrate, and seed the development database
|
|
||||||
RAILS_ENV=development ./bin/rails db:setup
|
|
||||||
|
|
||||||
# Precompile assets for development
|
|
||||||
RAILS_ENV=development ./bin/rails assets:precompile
|
|
||||||
|
|
||||||
# Precompile assets for test
|
|
||||||
RAILS_ENV=test NODE_ENV=tests ./bin/rails assets:precompile
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
👋 Welcome to "Mastodon" in GitHub Codespaces!
|
|
||||||
|
|
||||||
🛠️ Your environment is fully setup with all the required software.
|
|
||||||
|
|
||||||
🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).
|
|
||||||
|
|
||||||
📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.
|
|
||||||
|
|
||||||
@@ -1,14 +1,8 @@
|
|||||||
.bundle
|
|
||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
.git
|
|
||||||
.gitattributes
|
|
||||||
.gitignore
|
|
||||||
.github
|
|
||||||
public/system
|
public/system
|
||||||
public/assets
|
public/assets
|
||||||
public/packs
|
public/packs
|
||||||
public/packs-test
|
|
||||||
node_modules
|
node_modules
|
||||||
neo4j
|
neo4j
|
||||||
vendor/bundle
|
vendor/bundle
|
||||||
@@ -16,7 +10,5 @@ vendor/bundle
|
|||||||
*.swp
|
*.swp
|
||||||
*~
|
*~
|
||||||
postgres
|
postgres
|
||||||
postgres14
|
|
||||||
redis
|
redis
|
||||||
elasticsearch
|
elasticsearch
|
||||||
chart
|
|
||||||
|
|||||||
@@ -10,4 +10,3 @@ insert_final_newline = true
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|||||||
226
.env.nanobox
Normal file
226
.env.nanobox
Normal file
@@ -0,0 +1,226 @@
|
|||||||
|
# Service dependencies
|
||||||
|
# You may set REDIS_URL instead for more advanced options
|
||||||
|
REDIS_HOST=$DATA_REDIS_HOST
|
||||||
|
REDIS_PORT=6379
|
||||||
|
# REDIS_DB=0
|
||||||
|
|
||||||
|
# You may set DATABASE_URL instead for more advanced options
|
||||||
|
DB_HOST=$DATA_DB_HOST
|
||||||
|
DB_USER=$DATA_DB_USER
|
||||||
|
DB_NAME=gonano
|
||||||
|
DB_PASS=$DATA_DB_PASS
|
||||||
|
DB_PORT=5432
|
||||||
|
|
||||||
|
DATABASE_URL=postgresql://$DATA_DB_USER:$DATA_DB_PASS@$DATA_DB_HOST/gonano
|
||||||
|
|
||||||
|
# Optional ElasticSearch configuration
|
||||||
|
ES_ENABLED=true
|
||||||
|
ES_HOST=$DATA_ELASTIC_HOST
|
||||||
|
ES_PORT=9200
|
||||||
|
|
||||||
|
# Optimizations
|
||||||
|
LD_PRELOAD=/data/lib/libjemalloc.so
|
||||||
|
|
||||||
|
# ImageMagick optimizations
|
||||||
|
MAGICK_TEMPORARY_PATH=/app/tmp
|
||||||
|
MAGICK_MEMORY_LIMIT=128MiB
|
||||||
|
MAGICK_MAP_LIMIT=64MiB
|
||||||
|
MAGICK_TIME_LIMIT=15
|
||||||
|
MAGICK_AREA_LIMIT=16MP
|
||||||
|
MAGICK_WIDTH_LIMIT=8KP
|
||||||
|
MAGICK_HEIGHT_LIMIT=8KP
|
||||||
|
|
||||||
|
# Federation
|
||||||
|
# Note: Changing LOCAL_DOMAIN at a later time will cause unwanted side effects, including breaking all existing federation.
|
||||||
|
# LOCAL_DOMAIN should *NOT* contain the protocol part of the domain e.g https://example.com.
|
||||||
|
LOCAL_DOMAIN=${APP_NAME}.nanoapp.io
|
||||||
|
|
||||||
|
# Changing LOCAL_HTTPS in production is no longer supported. (Mastodon will always serve https:// links)
|
||||||
|
|
||||||
|
# Use this only if you need to run mastodon on a different domain than the one used for federation.
|
||||||
|
# You can read more about this option on https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md
|
||||||
|
# DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING.
|
||||||
|
# WEB_DOMAIN=mastodon.example.com
|
||||||
|
|
||||||
|
# Use this if you want to have several aliases handler@example1.com
|
||||||
|
# handler@example2.com etc. for the same user. LOCAL_DOMAIN should not
|
||||||
|
# be added. Comma separated values
|
||||||
|
# ALTERNATE_DOMAINS=example1.com,example2.com
|
||||||
|
|
||||||
|
# Application secrets
|
||||||
|
# Generate each with the `rake secret` task (`nanobox run bundle exec rake secret`)
|
||||||
|
SECRET_KEY_BASE=$SECRET_KEY_BASE
|
||||||
|
OTP_SECRET=$OTP_SECRET
|
||||||
|
|
||||||
|
# VAPID keys (used for push notifications)
|
||||||
|
# You can generate the keys using the following command (first is the private key, second is the public one)
|
||||||
|
# You should only generate this once per instance. If you later decide to change it, all push subscription will
|
||||||
|
# be invalidated, requiring the users to access the website again to resubscribe.
|
||||||
|
#
|
||||||
|
# Generate with `rake mastodon:webpush:generate_vapid_key` task (`nanobox run bundle exec rake mastodon:webpush:generate_vapid_key`)
|
||||||
|
#
|
||||||
|
# For more information visit https://rossta.net/blog/using-the-web-push-api-with-vapid.html
|
||||||
|
VAPID_PRIVATE_KEY=$VAPID_PRIVATE_KEY
|
||||||
|
VAPID_PUBLIC_KEY=$VAPID_PUBLIC_KEY
|
||||||
|
|
||||||
|
# Registrations
|
||||||
|
# Single user mode will disable registrations and redirect frontpage to the first profile
|
||||||
|
# SINGLE_USER_MODE=true
|
||||||
|
# Prevent registrations with following e-mail domains
|
||||||
|
# EMAIL_DOMAIN_BLACKLIST=example1.com|example2.de|etc
|
||||||
|
# Only allow registrations with the following e-mail domains
|
||||||
|
# EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc
|
||||||
|
|
||||||
|
# Optionally change default language
|
||||||
|
# DEFAULT_LOCALE=de
|
||||||
|
|
||||||
|
# E-mail configuration
|
||||||
|
# Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
|
||||||
|
# If you want to use an SMTP server without authentication (e.g local Postfix relay)
|
||||||
|
# then set SMTP_AUTH_METHOD and SMTP_OPENSSL_VERIFY_MODE to 'none' and
|
||||||
|
# *comment* SMTP_LOGIN and SMTP_PASSWORD (leaving them blank is not enough).
|
||||||
|
SMTP_SERVER=$SMTP_SERVER
|
||||||
|
SMTP_PORT=587
|
||||||
|
SMTP_LOGIN=$SMTP_LOGIN
|
||||||
|
SMTP_PASSWORD=$SMTP_PASSWORD
|
||||||
|
SMTP_FROM_ADDRESS=notifications@${APP_NAME}.nanoapp.io
|
||||||
|
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
|
||||||
|
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
|
||||||
|
#SMTP_AUTH_METHOD=plain
|
||||||
|
#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||||
|
#SMTP_OPENSSL_VERIFY_MODE=peer
|
||||||
|
#SMTP_ENABLE_STARTTLS_AUTO=true
|
||||||
|
#SMTP_TLS=true
|
||||||
|
|
||||||
|
# Optional user upload path and URL (images, avatars). Default is :rails_root/public/system. If you set this variable, you are responsible for making your HTTP server (eg. nginx) serve these files.
|
||||||
|
# PAPERCLIP_ROOT_PATH=/var/lib/mastodon/public-system
|
||||||
|
# PAPERCLIP_ROOT_URL=/system
|
||||||
|
|
||||||
|
# Optional asset host for multi-server setups
|
||||||
|
# CDN_HOST=https://assets.example.com
|
||||||
|
|
||||||
|
# S3 (optional)
|
||||||
|
# S3_ENABLED=true
|
||||||
|
# S3_BUCKET=
|
||||||
|
# AWS_ACCESS_KEY_ID=
|
||||||
|
# AWS_SECRET_ACCESS_KEY=
|
||||||
|
# S3_REGION=
|
||||||
|
# S3_PROTOCOL=http
|
||||||
|
# S3_HOSTNAME=192.168.1.123:9000
|
||||||
|
|
||||||
|
# S3 (Minio Config (optional) Please check Minio instance for details)
|
||||||
|
# S3_ENABLED=true
|
||||||
|
# S3_BUCKET=
|
||||||
|
# AWS_ACCESS_KEY_ID=
|
||||||
|
# AWS_SECRET_ACCESS_KEY=
|
||||||
|
# S3_REGION=
|
||||||
|
# S3_PROTOCOL=https
|
||||||
|
# S3_HOSTNAME=
|
||||||
|
# S3_ENDPOINT=
|
||||||
|
# S3_SIGNATURE_VERSION=
|
||||||
|
|
||||||
|
# Swift (optional)
|
||||||
|
# SWIFT_ENABLED=true
|
||||||
|
# SWIFT_USERNAME=
|
||||||
|
# For Keystone V3, the value for SWIFT_TENANT should be the project name
|
||||||
|
# SWIFT_TENANT=
|
||||||
|
# SWIFT_PASSWORD=
|
||||||
|
# Keystone V2 and V3 URLs are supported. Use a V3 URL if possible to avoid
|
||||||
|
# issues with token rate-limiting during high load.
|
||||||
|
# SWIFT_AUTH_URL=
|
||||||
|
# SWIFT_CONTAINER=
|
||||||
|
# SWIFT_OBJECT_URL=
|
||||||
|
# SWIFT_REGION=
|
||||||
|
# Defaults to 'default'
|
||||||
|
# SWIFT_DOMAIN_NAME=
|
||||||
|
# Defaults to 60 seconds. Set to 0 to disable
|
||||||
|
# SWIFT_CACHE_TTL=
|
||||||
|
|
||||||
|
# Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
|
||||||
|
# S3_CLOUDFRONT_HOST=
|
||||||
|
|
||||||
|
# Streaming API integration
|
||||||
|
# STREAMING_API_BASE_URL=
|
||||||
|
|
||||||
|
# Advanced settings
|
||||||
|
# If you need to use pgBouncer, you need to disable prepared statements:
|
||||||
|
# PREPARED_STATEMENTS=false
|
||||||
|
|
||||||
|
# Cluster number setting for streaming API server.
|
||||||
|
# If you comment out following line, cluster number will be `numOfCpuCores - 1`.
|
||||||
|
# STREAMING_CLUSTER_NUM=1
|
||||||
|
|
||||||
|
# Docker mastodon user
|
||||||
|
# If you use Docker, you may want to assign UID/GID manually.
|
||||||
|
# UID=1000
|
||||||
|
# GID=1000
|
||||||
|
|
||||||
|
# LDAP authentication (optional)
|
||||||
|
# LDAP_ENABLED=true
|
||||||
|
# LDAP_HOST=localhost
|
||||||
|
# LDAP_PORT=389
|
||||||
|
# LDAP_METHOD=simple_tls
|
||||||
|
# LDAP_BASE=
|
||||||
|
# LDAP_BIND_DN=
|
||||||
|
# LDAP_PASSWORD=
|
||||||
|
# LDAP_UID=cn
|
||||||
|
|
||||||
|
# PAM authentication (optional)
|
||||||
|
# PAM authentication uses for the email generation the "email" pam variable
|
||||||
|
# and optional as fallback PAM_DEFAULT_SUFFIX
|
||||||
|
# The pam environment variable "email" is provided by:
|
||||||
|
# https://github.com/devkral/pam_email_extractor
|
||||||
|
# PAM_ENABLED=true
|
||||||
|
# Fallback Suffix for email address generation (nil by default)
|
||||||
|
# PAM_DEFAULT_SUFFIX=pam
|
||||||
|
# Name of the pam service (pam "auth" section is evaluated)
|
||||||
|
# PAM_DEFAULT_SERVICE=rpam
|
||||||
|
# Name of the pam service used for checking if an user can register (pam "account" section is evaluated) (nil (disabled) by default)
|
||||||
|
# PAM_CONTROLLED_SERVICE=rpam
|
||||||
|
|
||||||
|
# Global OAuth settings (optional) :
|
||||||
|
# If you have only one strategy, you may want to enable this
|
||||||
|
# OAUTH_REDIRECT_AT_SIGN_IN=true
|
||||||
|
|
||||||
|
# Optional CAS authentication (cf. omniauth-cas) :
|
||||||
|
# CAS_ENABLED=true
|
||||||
|
# CAS_URL=https://sso.myserver.com/
|
||||||
|
# CAS_HOST=sso.myserver.com/
|
||||||
|
# CAS_PORT=443
|
||||||
|
# CAS_SSL=true
|
||||||
|
# CAS_VALIDATE_URL=
|
||||||
|
# CAS_CALLBACK_URL=
|
||||||
|
# CAS_LOGOUT_URL=
|
||||||
|
# CAS_LOGIN_URL=
|
||||||
|
# CAS_UID_FIELD='user'
|
||||||
|
# CAS_CA_PATH=
|
||||||
|
# CAS_DISABLE_SSL_VERIFICATION=false
|
||||||
|
# CAS_UID_KEY='user'
|
||||||
|
# CAS_NAME_KEY='name'
|
||||||
|
# CAS_EMAIL_KEY='email'
|
||||||
|
# CAS_NICKNAME_KEY='nickname'
|
||||||
|
# CAS_FIRST_NAME_KEY='firstname'
|
||||||
|
# CAS_LAST_NAME_KEY='lastname'
|
||||||
|
# CAS_LOCATION_KEY='location'
|
||||||
|
# CAS_IMAGE_KEY='image'
|
||||||
|
# CAS_PHONE_KEY='phone'
|
||||||
|
|
||||||
|
# Optional SAML authentication (cf. omniauth-saml)
|
||||||
|
# SAML_ENABLED=true
|
||||||
|
# SAML_ACS_URL=
|
||||||
|
# SAML_ISSUER=http://localhost:3000/auth/auth/saml/callback
|
||||||
|
# SAML_IDP_SSO_TARGET_URL=https://idp.testshib.org/idp/profile/SAML2/Redirect/SSO
|
||||||
|
# SAML_IDP_CERT=
|
||||||
|
# SAML_IDP_CERT_FINGERPRINT=
|
||||||
|
# SAML_NAME_IDENTIFIER_FORMAT=
|
||||||
|
# SAML_CERT=
|
||||||
|
# SAML_PRIVATE_KEY=
|
||||||
|
# SAML_SECURITY_WANT_ASSERTION_SIGNED=true
|
||||||
|
# SAML_SECURITY_WANT_ASSERTION_ENCRYPTED=true
|
||||||
|
# SAML_SECURITY_ASSUME_EMAIL_IS_VERIFIED=true
|
||||||
|
# SAML_ATTRIBUTES_STATEMENTS_UID="urn:oid:0.9.2342.19200300.100.1.1"
|
||||||
|
# SAML_ATTRIBUTES_STATEMENTS_EMAIL="urn:oid:1.3.6.1.4.1.5923.1.1.1.6"
|
||||||
|
# SAML_ATTRIBUTES_STATEMENTS_FULL_NAME="urn:oid:2.5.4.42"
|
||||||
|
# SAML_UID_ATTRIBUTE="urn:oid:0.9.2342.19200300.100.1.1"
|
||||||
|
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED=
|
||||||
|
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL=
|
||||||
@@ -1,23 +1,28 @@
|
|||||||
# This is a sample configuration file. You can generate your configuration
|
# Service dependencies
|
||||||
# with the `rake mastodon:setup` interactive setup wizard, but to customize
|
# You may set REDIS_URL instead for more advanced options
|
||||||
# your setup even further, you'll need to edit it manually. This sample does
|
# You may also set REDIS_NAMESPACE to share Redis between multiple Mastodon servers
|
||||||
# not demonstrate all available configuration options. Please look at
|
REDIS_HOST=redis
|
||||||
# https://docs.joinmastodon.org/admin/config/ for the full documentation.
|
REDIS_PORT=6379
|
||||||
|
# You may set DATABASE_URL instead for more advanced options
|
||||||
# Note that this file accepts slightly different syntax depending on whether
|
DB_HOST=db
|
||||||
# you are using `docker-compose` or not. In particular, if you use
|
DB_USER=postgres
|
||||||
# `docker-compose`, the value of each declared variable will be taken verbatim,
|
DB_NAME=postgres
|
||||||
# including surrounding quotes.
|
DB_PASS=
|
||||||
# See: https://github.com/mastodon/mastodon/issues/16895
|
DB_PORT=5432
|
||||||
|
# Optional ElasticSearch configuration
|
||||||
|
# ES_ENABLED=true
|
||||||
|
# ES_HOST=es
|
||||||
|
# ES_PORT=9200
|
||||||
|
|
||||||
# Federation
|
# Federation
|
||||||
# ----------
|
# Note: Changing LOCAL_DOMAIN at a later time will cause unwanted side effects, including breaking all existing federation.
|
||||||
# This identifies your server and cannot be changed safely later
|
# LOCAL_DOMAIN should *NOT* contain the protocol part of the domain e.g https://example.com.
|
||||||
# ----------
|
|
||||||
LOCAL_DOMAIN=example.com
|
LOCAL_DOMAIN=example.com
|
||||||
|
|
||||||
|
# Changing LOCAL_HTTPS in production is no longer supported. (Mastodon will always serve https:// links)
|
||||||
|
|
||||||
# Use this only if you need to run mastodon on a different domain than the one used for federation.
|
# Use this only if you need to run mastodon on a different domain than the one used for federation.
|
||||||
# You can read more about this option on https://docs.joinmastodon.org/admin/config/#web-domain
|
# You can read more about this option on https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md
|
||||||
# DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING.
|
# DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING.
|
||||||
# WEB_DOMAIN=mastodon.example.com
|
# WEB_DOMAIN=mastodon.example.com
|
||||||
|
|
||||||
@@ -26,102 +31,87 @@ LOCAL_DOMAIN=example.com
|
|||||||
# be added. Comma separated values
|
# be added. Comma separated values
|
||||||
# ALTERNATE_DOMAINS=example1.com,example2.com
|
# ALTERNATE_DOMAINS=example1.com,example2.com
|
||||||
|
|
||||||
# Use HTTP proxy for outgoing request (optional)
|
# Application secrets
|
||||||
# http_proxy=http://gateway.local:8118
|
# Generate each with the `RAILS_ENV=production bundle exec rake secret` task (`docker-compose run --rm web rake secret` if you use docker compose)
|
||||||
# Access control for hidden service.
|
|
||||||
# ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
|
|
||||||
|
|
||||||
# Authorized fetch mode (optional)
|
|
||||||
# Require remote servers to authentify when fetching toots, see
|
|
||||||
# https://docs.joinmastodon.org/admin/config/#authorized_fetch
|
|
||||||
# AUTHORIZED_FETCH=true
|
|
||||||
|
|
||||||
# Limited federation mode (optional)
|
|
||||||
# Only allow federation with specific domains, see
|
|
||||||
# https://docs.joinmastodon.org/admin/config/#whitelist_mode
|
|
||||||
# LIMITED_FEDERATION_MODE=true
|
|
||||||
|
|
||||||
# Redis
|
|
||||||
# -----
|
|
||||||
REDIS_HOST=localhost
|
|
||||||
REDIS_PORT=6379
|
|
||||||
|
|
||||||
|
|
||||||
# PostgreSQL
|
|
||||||
# ----------
|
|
||||||
DB_HOST=/var/run/postgresql
|
|
||||||
DB_USER=mastodon
|
|
||||||
DB_NAME=mastodon_production
|
|
||||||
DB_PASS=
|
|
||||||
DB_PORT=5432
|
|
||||||
|
|
||||||
|
|
||||||
# Elasticsearch (optional)
|
|
||||||
# ------------------------
|
|
||||||
#ES_ENABLED=true
|
|
||||||
#ES_HOST=localhost
|
|
||||||
#ES_PORT=9200
|
|
||||||
# Authentication for ES (optional)
|
|
||||||
#ES_USER=elastic
|
|
||||||
#ES_PASS=password
|
|
||||||
|
|
||||||
|
|
||||||
# Secrets
|
|
||||||
# -------
|
|
||||||
# Generate each with the `RAILS_ENV=production bundle exec rake secret` task (`docker-compose run --rm web bundle exec rake secret` if you use docker compose)
|
|
||||||
# -------
|
|
||||||
SECRET_KEY_BASE=
|
SECRET_KEY_BASE=
|
||||||
OTP_SECRET=
|
OTP_SECRET=
|
||||||
|
|
||||||
|
# VAPID keys (used for push notifications
|
||||||
# Web Push
|
# You can generate the keys using the following command (first is the private key, second is the public one)
|
||||||
# --------
|
|
||||||
# Generate with `rake mastodon:webpush:generate_vapid_key` (first is the private key, second is the public one)
|
|
||||||
# You should only generate this once per instance. If you later decide to change it, all push subscription will
|
# You should only generate this once per instance. If you later decide to change it, all push subscription will
|
||||||
# be invalidated, requiring the users to access the website again to resubscribe.
|
# be invalidated, requiring the users to access the website again to resubscribe.
|
||||||
# --------
|
#
|
||||||
|
# Generate with `RAILS_ENV=production bundle exec rake mastodon:webpush:generate_vapid_key` task (`docker-compose run --rm web rake mastodon:webpush:generate_vapid_key` if you use docker compose)
|
||||||
|
#
|
||||||
|
# For more information visit https://rossta.net/blog/using-the-web-push-api-with-vapid.html
|
||||||
VAPID_PRIVATE_KEY=
|
VAPID_PRIVATE_KEY=
|
||||||
VAPID_PUBLIC_KEY=
|
VAPID_PUBLIC_KEY=
|
||||||
|
|
||||||
|
|
||||||
# Registrations
|
# Registrations
|
||||||
# -------------
|
|
||||||
|
|
||||||
# Single user mode will disable registrations and redirect frontpage to the first profile
|
# Single user mode will disable registrations and redirect frontpage to the first profile
|
||||||
# SINGLE_USER_MODE=true
|
# SINGLE_USER_MODE=true
|
||||||
|
|
||||||
# Prevent registrations with following e-mail domains
|
# Prevent registrations with following e-mail domains
|
||||||
# EMAIL_DOMAIN_DENYLIST=example1.com|example2.de|etc
|
# EMAIL_DOMAIN_BLACKLIST=example1.com|example2.de|etc
|
||||||
|
|
||||||
# Only allow registrations with the following e-mail domains
|
# Only allow registrations with the following e-mail domains
|
||||||
# EMAIL_DOMAIN_ALLOWLIST=example1.com|example2.de|etc
|
# EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc
|
||||||
|
|
||||||
#TODO move this
|
|
||||||
# Optionally change default language
|
# Optionally change default language
|
||||||
# DEFAULT_LOCALE=de
|
# DEFAULT_LOCALE=de
|
||||||
|
|
||||||
|
# E-mail configuration
|
||||||
# Sending mail
|
# Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
|
||||||
# ------------
|
# If you want to use an SMTP server without authentication (e.g local Postfix relay)
|
||||||
SMTP_SERVER=
|
# then set SMTP_AUTH_METHOD and SMTP_OPENSSL_VERIFY_MODE to 'none' and
|
||||||
|
# *comment* SMTP_LOGIN and SMTP_PASSWORD (leaving them blank is not enough).
|
||||||
|
SMTP_SERVER=smtp.mailgun.org
|
||||||
SMTP_PORT=587
|
SMTP_PORT=587
|
||||||
SMTP_LOGIN=
|
SMTP_LOGIN=
|
||||||
SMTP_PASSWORD=
|
SMTP_PASSWORD=
|
||||||
SMTP_FROM_ADDRESS=notifications@example.com
|
SMTP_FROM_ADDRESS=notifications@example.com
|
||||||
|
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
|
||||||
|
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
|
||||||
|
#SMTP_AUTH_METHOD=plain
|
||||||
|
#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||||
|
#SMTP_OPENSSL_VERIFY_MODE=peer
|
||||||
|
#SMTP_ENABLE_STARTTLS_AUTO=true
|
||||||
|
#SMTP_TLS=true
|
||||||
|
|
||||||
|
# Optional user upload path and URL (images, avatars). Default is :rails_root/public/system. If you set this variable, you are responsible for making your HTTP server (eg. nginx) serve these files.
|
||||||
|
# PAPERCLIP_ROOT_PATH=/var/lib/mastodon/public-system
|
||||||
|
# PAPERCLIP_ROOT_URL=/system
|
||||||
|
|
||||||
# File storage (optional)
|
# Optional asset host for multi-server setups
|
||||||
# -----------------------
|
# The asset host must allow cross origin request from WEB_DOMAIN or LOCAL_DOMAIN
|
||||||
|
# if WEB_DOMAIN is not set. For example, the server may have the
|
||||||
|
# following header field:
|
||||||
|
# Access-Control-Allow-Origin: https://example.com/
|
||||||
|
# CDN_HOST=https://assets.example.com
|
||||||
|
|
||||||
|
# S3 (optional)
|
||||||
# The attachment host must allow cross origin request from WEB_DOMAIN or
|
# The attachment host must allow cross origin request from WEB_DOMAIN or
|
||||||
# LOCAL_DOMAIN if WEB_DOMAIN is not set. For example, the server may have the
|
# LOCAL_DOMAIN if WEB_DOMAIN is not set. For example, the server may have the
|
||||||
# following header field:
|
# following header field:
|
||||||
# Access-Control-Allow-Origin: https://192.168.1.123:9000/
|
# Access-Control-Allow-Origin: https://192.168.1.123:9000/
|
||||||
# -----------------------
|
# S3_ENABLED=true
|
||||||
#S3_ENABLED=true
|
# S3_BUCKET=
|
||||||
#S3_BUCKET=files.example.com
|
# AWS_ACCESS_KEY_ID=
|
||||||
#AWS_ACCESS_KEY_ID=
|
# AWS_SECRET_ACCESS_KEY=
|
||||||
#AWS_SECRET_ACCESS_KEY=
|
# S3_REGION=
|
||||||
#S3_ALIAS_HOST=files.example.com
|
# S3_PROTOCOL=http
|
||||||
|
# S3_HOSTNAME=192.168.1.123:9000
|
||||||
|
|
||||||
|
# S3 (Minio Config (optional) Please check Minio instance for details)
|
||||||
|
# The attachment host must allow cross origin request - see the description
|
||||||
|
# above.
|
||||||
|
# S3_ENABLED=true
|
||||||
|
# S3_BUCKET=
|
||||||
|
# AWS_ACCESS_KEY_ID=
|
||||||
|
# AWS_SECRET_ACCESS_KEY=
|
||||||
|
# S3_REGION=
|
||||||
|
# S3_PROTOCOL=https
|
||||||
|
# S3_HOSTNAME=
|
||||||
|
# S3_ENDPOINT=
|
||||||
|
# S3_SIGNATURE_VERSION=
|
||||||
|
|
||||||
# Swift (optional)
|
# Swift (optional)
|
||||||
# The attachment host must allow cross origin request - see the description
|
# The attachment host must allow cross origin request - see the description
|
||||||
@@ -144,27 +134,28 @@ SMTP_FROM_ADDRESS=notifications@example.com
|
|||||||
# Defaults to 60 seconds. Set to 0 to disable
|
# Defaults to 60 seconds. Set to 0 to disable
|
||||||
# SWIFT_CACHE_TTL=
|
# SWIFT_CACHE_TTL=
|
||||||
|
|
||||||
# Optional asset host for multi-server setups
|
# Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
|
||||||
# The asset host must allow cross origin request from WEB_DOMAIN or LOCAL_DOMAIN
|
# S3_CLOUDFRONT_HOST=
|
||||||
# if WEB_DOMAIN is not set. For example, the server may have the
|
|
||||||
# following header field:
|
|
||||||
# Access-Control-Allow-Origin: https://example.com/
|
|
||||||
# CDN_HOST=https://assets.example.com
|
|
||||||
|
|
||||||
# Optional list of hosts that are allowed to serve media for your instance
|
|
||||||
# This is useful if you include external media in your custom CSS or about page,
|
|
||||||
# or if your data storage provider makes use of redirects to other domains.
|
|
||||||
# EXTRA_DATA_HOSTS=https://data.example1.com|https://data.example2.com
|
|
||||||
|
|
||||||
# Optional alias for S3 (e.g. to serve files on a custom domain, possibly using Cloudfront or Cloudflare)
|
|
||||||
# S3_ALIAS_HOST=
|
|
||||||
|
|
||||||
# Streaming API integration
|
# Streaming API integration
|
||||||
# STREAMING_API_BASE_URL=
|
# STREAMING_API_BASE_URL=
|
||||||
|
|
||||||
|
# Advanced settings
|
||||||
|
# If you need to use pgBouncer, you need to disable prepared statements:
|
||||||
|
# PREPARED_STATEMENTS=false
|
||||||
|
|
||||||
|
# Cluster number setting for streaming API server.
|
||||||
|
# If you comment out following line, cluster number will be `numOfCpuCores - 1`.
|
||||||
|
STREAMING_CLUSTER_NUM=1
|
||||||
|
|
||||||
|
# Docker mastodon user
|
||||||
|
# If you use Docker, you may want to assign UID/GID manually.
|
||||||
|
# UID=1000
|
||||||
|
# GID=1000
|
||||||
|
|
||||||
|
# Maximum allowed character count
|
||||||
|
# MAX_TOOT_CHARS=500
|
||||||
|
|
||||||
# External authentication (optional)
|
|
||||||
# ----------------------------------
|
|
||||||
# LDAP authentication (optional)
|
# LDAP authentication (optional)
|
||||||
# LDAP_ENABLED=true
|
# LDAP_ENABLED=true
|
||||||
# LDAP_HOST=localhost
|
# LDAP_HOST=localhost
|
||||||
@@ -174,11 +165,6 @@ SMTP_FROM_ADDRESS=notifications@example.com
|
|||||||
# LDAP_BIND_DN=
|
# LDAP_BIND_DN=
|
||||||
# LDAP_PASSWORD=
|
# LDAP_PASSWORD=
|
||||||
# LDAP_UID=cn
|
# LDAP_UID=cn
|
||||||
# LDAP_MAIL=mail
|
|
||||||
# LDAP_SEARCH_FILTER=(|(%{uid}=%{email})(%{mail}=%{email}))
|
|
||||||
# LDAP_UID_CONVERSION_ENABLED=true
|
|
||||||
# LDAP_UID_CONVERSION_SEARCH=., -
|
|
||||||
# LDAP_UID_CONVERSION_REPLACE=_
|
|
||||||
|
|
||||||
# PAM authentication (optional)
|
# PAM authentication (optional)
|
||||||
# PAM authentication uses for the email generation the "email" pam variable
|
# PAM authentication uses for the email generation the "email" pam variable
|
||||||
@@ -222,8 +208,8 @@ SMTP_FROM_ADDRESS=notifications@example.com
|
|||||||
|
|
||||||
# Optional SAML authentication (cf. omniauth-saml)
|
# Optional SAML authentication (cf. omniauth-saml)
|
||||||
# SAML_ENABLED=true
|
# SAML_ENABLED=true
|
||||||
# SAML_ACS_URL=http://localhost:3000/auth/auth/saml/callback
|
# SAML_ACS_URL=
|
||||||
# SAML_ISSUER=https://example.com
|
# SAML_ISSUER=http://localhost:3000/auth/auth/saml/callback
|
||||||
# SAML_IDP_SSO_TARGET_URL=https://idp.testshib.org/idp/profile/SAML2/Redirect/SSO
|
# SAML_IDP_SSO_TARGET_URL=https://idp.testshib.org/idp/profile/SAML2/Redirect/SSO
|
||||||
# SAML_IDP_CERT=
|
# SAML_IDP_CERT=
|
||||||
# SAML_IDP_CERT_FINGERPRINT=
|
# SAML_IDP_CERT_FINGERPRINT=
|
||||||
@@ -242,62 +228,9 @@ SMTP_FROM_ADDRESS=notifications@example.com
|
|||||||
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED=
|
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED=
|
||||||
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL=
|
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL=
|
||||||
|
|
||||||
|
# Use HTTP proxy for outgoing request (optional)
|
||||||
# Custom settings
|
# http_proxy=http://gateway.local:8118
|
||||||
# ---------------
|
# Access control for hidden service.
|
||||||
# Various ways to customize Mastodon's behavior
|
# ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
|
||||||
# ---------------
|
# If you use transparent proxy to access to hidden service, uncomment following for skipping private address check.
|
||||||
|
# HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY=true
|
||||||
# Maximum allowed character count
|
|
||||||
MAX_TOOT_CHARS=500
|
|
||||||
|
|
||||||
# Maximum number of pinned posts
|
|
||||||
MAX_PINNED_TOOTS=5
|
|
||||||
|
|
||||||
# Maximum allowed bio characters
|
|
||||||
MAX_BIO_CHARS=500
|
|
||||||
|
|
||||||
# Maximim number of profile fields allowed
|
|
||||||
MAX_PROFILE_FIELDS=4
|
|
||||||
|
|
||||||
# Maximum allowed display name characters
|
|
||||||
MAX_DISPLAY_NAME_CHARS=30
|
|
||||||
|
|
||||||
# Maximum allowed poll options
|
|
||||||
MAX_POLL_OPTIONS=5
|
|
||||||
|
|
||||||
# Maximum allowed poll option characters
|
|
||||||
MAX_POLL_OPTION_CHARS=100
|
|
||||||
|
|
||||||
# Maximum image and video/audio upload sizes
|
|
||||||
# Units are in bytes
|
|
||||||
# 1048576 bytes equals 1 megabyte
|
|
||||||
# MAX_IMAGE_SIZE=8388608
|
|
||||||
# MAX_VIDEO_SIZE=41943040
|
|
||||||
|
|
||||||
# Maximum search results to display
|
|
||||||
# Only relevant when elasticsearch is installed
|
|
||||||
# MAX_SEARCH_RESULTS=20
|
|
||||||
|
|
||||||
# Maximum hashtags to display
|
|
||||||
# Customize the number of hashtags shown in 'Explore'
|
|
||||||
# MAX_TRENDING_TAGS=10
|
|
||||||
|
|
||||||
# Maximum custom emoji file sizes
|
|
||||||
# If undefined or smaller than MAX_EMOJI_SIZE, the value
|
|
||||||
# of MAX_EMOJI_SIZE will be used for MAX_REMOTE_EMOJI_SIZE
|
|
||||||
# Units are in bytes
|
|
||||||
# MAX_EMOJI_SIZE=262144
|
|
||||||
# MAX_REMOTE_EMOJI_SIZE=262144
|
|
||||||
|
|
||||||
# Optional hCaptcha support
|
|
||||||
# HCAPTCHA_SECRET_KEY=
|
|
||||||
# HCAPTCHA_SITE_KEY=
|
|
||||||
|
|
||||||
# IP and session retention
|
|
||||||
# -----------------------
|
|
||||||
# Make sure to modify the scheduling of ip_cleanup_scheduler in config/sidekiq.yml
|
|
||||||
# to be less than daily if you lower IP_RETENTION_PERIOD below two days (172800).
|
|
||||||
# -----------------------
|
|
||||||
IP_RETENTION_PERIOD=31556952
|
|
||||||
SESSION_RETENTION_PERIOD=31556952
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# In test, compile the NodeJS code as if we are in production
|
# Node.js
|
||||||
NODE_ENV=production
|
NODE_ENV=test
|
||||||
# Federation
|
# Federation
|
||||||
LOCAL_DOMAIN=cb6e6126.ngrok.io
|
LOCAL_DOMAIN=cb6e6126.ngrok.io
|
||||||
LOCAL_HTTPS=true
|
LOCAL_HTTPS=true
|
||||||
|
# test pam authentication
|
||||||
|
PAM_ENABLED=true
|
||||||
|
PAM_DEFAULT_SERVICE=pam_test
|
||||||
|
PAM_CONTROLLED_SERVICE=pam_test_controlled
|
||||||
|
|||||||
@@ -1,8 +1,2 @@
|
|||||||
VAGRANT=true
|
VAGRANT=true
|
||||||
LOCAL_DOMAIN=mastodon.local
|
LOCAL_DOMAIN=mastodon.dev
|
||||||
BIND=0.0.0.0
|
|
||||||
DB_HOST=/var/run/postgresql/
|
|
||||||
|
|
||||||
ES_ENABLED=true
|
|
||||||
ES_HOST=localhost
|
|
||||||
ES_PORT=9200
|
|
||||||
@@ -1,13 +1,30 @@
|
|||||||
/build/**
|
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
||||||
/coverage/**
|
#
|
||||||
/db/**
|
# If you find yourself ignoring temporary files generated by your text editor
|
||||||
/lib/**
|
# or operating system, you probably want to add a global ignore instead:
|
||||||
/log/**
|
# git config --global core.excludesfile '~/.gitignore_global'
|
||||||
/node_modules/**
|
|
||||||
/nonobox/**
|
# Ignore bundler config.
|
||||||
/public/**
|
/.bundle
|
||||||
!/public/embed.js
|
|
||||||
/spec/**
|
# Ignore the default SQLite database.
|
||||||
/tmp/**
|
/db/*.sqlite3
|
||||||
/vendor/**
|
/db/*.sqlite3-journal
|
||||||
!.eslintrc.js
|
|
||||||
|
# Ignore all logfiles and tempfiles.
|
||||||
|
/log/*
|
||||||
|
!/log/.keep
|
||||||
|
/tmp
|
||||||
|
coverage
|
||||||
|
public/system
|
||||||
|
public/assets
|
||||||
|
.env
|
||||||
|
.env.production
|
||||||
|
node_modules/
|
||||||
|
neo4j/
|
||||||
|
|
||||||
|
# Ignore Vagrant files
|
||||||
|
.vagrant/
|
||||||
|
|
||||||
|
# Ignore Capistrano customizations
|
||||||
|
config/deploy/*
|
||||||
|
|||||||
402
.eslintrc.js
402
.eslintrc.js
@@ -1,402 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
|
|
||||||
extends: [
|
|
||||||
'eslint:recommended',
|
|
||||||
'plugin:react/recommended',
|
|
||||||
'plugin:react-hooks/recommended',
|
|
||||||
'plugin:jsx-a11y/recommended',
|
|
||||||
'plugin:import/recommended',
|
|
||||||
'plugin:promise/recommended',
|
|
||||||
'plugin:jsdoc/recommended',
|
|
||||||
],
|
|
||||||
|
|
||||||
env: {
|
|
||||||
browser: true,
|
|
||||||
node: true,
|
|
||||||
es6: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
globals: {
|
|
||||||
ATTACHMENT_HOST: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
|
|
||||||
plugins: [
|
|
||||||
'react',
|
|
||||||
'jsx-a11y',
|
|
||||||
'import',
|
|
||||||
'promise',
|
|
||||||
'@typescript-eslint',
|
|
||||||
'formatjs',
|
|
||||||
],
|
|
||||||
|
|
||||||
parserOptions: {
|
|
||||||
sourceType: 'module',
|
|
||||||
ecmaFeatures: {
|
|
||||||
jsx: true,
|
|
||||||
},
|
|
||||||
ecmaVersion: 2021,
|
|
||||||
requireConfigFile: false,
|
|
||||||
babelOptions: {
|
|
||||||
configFile: false,
|
|
||||||
presets: ['@babel/react', '@babel/env'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
settings: {
|
|
||||||
react: {
|
|
||||||
version: 'detect',
|
|
||||||
},
|
|
||||||
'import/ignore': [
|
|
||||||
'node_modules',
|
|
||||||
'\\.(css|scss|json)$',
|
|
||||||
],
|
|
||||||
'import/resolver': {
|
|
||||||
typescript: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
'consistent-return': 'error',
|
|
||||||
'dot-notation': 'error',
|
|
||||||
eqeqeq: ['error', 'always', { 'null': 'ignore' }],
|
|
||||||
'indent': ['error', 2],
|
|
||||||
'jsx-quotes': ['error', 'prefer-single'],
|
|
||||||
'semi': ['error', 'always'],
|
|
||||||
'no-case-declarations': 'off',
|
|
||||||
'no-catch-shadow': 'error',
|
|
||||||
'no-console': [
|
|
||||||
'warn',
|
|
||||||
{
|
|
||||||
allow: [
|
|
||||||
'error',
|
|
||||||
'warn',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'no-empty': 'off',
|
|
||||||
'no-restricted-properties': [
|
|
||||||
'error',
|
|
||||||
{ property: 'substring', message: 'Use .slice instead of .substring.' },
|
|
||||||
{ property: 'substr', message: 'Use .slice instead of .substr.' },
|
|
||||||
],
|
|
||||||
'no-restricted-syntax': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
// eslint-disable-next-line no-restricted-syntax
|
|
||||||
selector: 'Literal[value=/•/], JSXText[value=/•/]',
|
|
||||||
// eslint-disable-next-line no-restricted-syntax
|
|
||||||
message: "Use '·' (middle dot) instead of '•' (bullet)",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'no-self-assign': 'off',
|
|
||||||
'no-unused-expressions': 'error',
|
|
||||||
'no-unused-vars': 'off',
|
|
||||||
'@typescript-eslint/no-unused-vars': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
vars: 'all',
|
|
||||||
args: 'after-used',
|
|
||||||
destructuredArrayIgnorePattern: '^_',
|
|
||||||
ignoreRestSiblings: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'valid-typeof': 'error',
|
|
||||||
|
|
||||||
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', 'tsx'] }],
|
|
||||||
'react/jsx-boolean-value': 'error',
|
|
||||||
'react/display-name': 'off',
|
|
||||||
'react/jsx-fragments': ['error', 'syntax'],
|
|
||||||
'react/jsx-equals-spacing': 'error',
|
|
||||||
'react/jsx-no-bind': 'error',
|
|
||||||
'react/jsx-no-useless-fragment': 'error',
|
|
||||||
'react/jsx-no-target-blank': 'off',
|
|
||||||
'react/jsx-tag-spacing': 'error',
|
|
||||||
'react/jsx-uses-react': 'off', // not needed with new JSX transform
|
|
||||||
'react/jsx-wrap-multilines': 'error',
|
|
||||||
'react/no-deprecated': 'off',
|
|
||||||
'react/no-unknown-property': 'off',
|
|
||||||
'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
|
|
||||||
'jsx-a11y/accessible-emoji': 'warn',
|
|
||||||
'jsx-a11y/click-events-have-key-events': 'off',
|
|
||||||
'jsx-a11y/label-has-associated-control': 'off',
|
|
||||||
'jsx-a11y/media-has-caption': 'off',
|
|
||||||
'jsx-a11y/no-autofocus': 'off',
|
|
||||||
// recommended rule is:
|
|
||||||
// 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
|
|
||||||
// 'error',
|
|
||||||
// {
|
|
||||||
// tr: ['none', 'presentation'],
|
|
||||||
// canvas: ['img'],
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'off',
|
|
||||||
// recommended rule is:
|
|
||||||
// 'jsx-a11y/no-noninteractive-element-interactions': [
|
|
||||||
// 'error',
|
|
||||||
// {
|
|
||||||
// body: ['onError', 'onLoad'],
|
|
||||||
// iframe: ['onError', 'onLoad'],
|
|
||||||
// img: ['onError', 'onLoad'],
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
'jsx-a11y/no-noninteractive-element-interactions': [
|
|
||||||
'warn',
|
|
||||||
{
|
|
||||||
handlers: [
|
|
||||||
'onClick',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// recommended rule is:
|
|
||||||
// 'jsx-a11y/no-noninteractive-tabindex': [
|
|
||||||
// 'error',
|
|
||||||
// {
|
|
||||||
// tags: [],
|
|
||||||
// roles: ['tabpanel'],
|
|
||||||
// allowExpressionValues: true,
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
'jsx-a11y/no-noninteractive-tabindex': 'off',
|
|
||||||
'jsx-a11y/no-onchange': 'warn',
|
|
||||||
// recommended is full 'error'
|
|
||||||
'jsx-a11y/no-static-element-interactions': [
|
|
||||||
'warn',
|
|
||||||
{
|
|
||||||
handlers: [
|
|
||||||
'onClick',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
// See https://github.com/import-js/eslint-plugin-import/blob/main/config/recommended.js
|
|
||||||
'import/extensions': [
|
|
||||||
'error',
|
|
||||||
'always',
|
|
||||||
{
|
|
||||||
js: 'never',
|
|
||||||
jsx: 'never',
|
|
||||||
mjs: 'never',
|
|
||||||
ts: 'never',
|
|
||||||
tsx: 'never',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'import/first': 'error',
|
|
||||||
'import/newline-after-import': 'error',
|
|
||||||
'import/no-anonymous-default-export': 'error',
|
|
||||||
'import/no-extraneous-dependencies': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
devDependencies: [
|
|
||||||
'config/webpack/**',
|
|
||||||
'app/javascript/mastodon/performance.js',
|
|
||||||
'app/javascript/mastodon/test_setup.js',
|
|
||||||
'app/javascript/**/__tests__/**',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'import/no-amd': 'error',
|
|
||||||
'import/no-commonjs': 'error',
|
|
||||||
'import/no-import-module-exports': 'error',
|
|
||||||
'import/no-relative-packages': 'error',
|
|
||||||
'import/no-self-import': 'error',
|
|
||||||
'import/no-useless-path-segments': 'error',
|
|
||||||
'import/no-webpack-loader-syntax': 'error',
|
|
||||||
|
|
||||||
'import/order': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
alphabetize: { order: 'asc' },
|
|
||||||
'newlines-between': 'always',
|
|
||||||
groups: [
|
|
||||||
'builtin',
|
|
||||||
'external',
|
|
||||||
'internal',
|
|
||||||
'parent',
|
|
||||||
['index', 'sibling'],
|
|
||||||
'object',
|
|
||||||
],
|
|
||||||
pathGroups: [
|
|
||||||
// React core packages
|
|
||||||
{
|
|
||||||
pattern: '{react,react-dom,react-dom/client,prop-types}',
|
|
||||||
group: 'builtin',
|
|
||||||
position: 'after',
|
|
||||||
},
|
|
||||||
// I18n
|
|
||||||
{
|
|
||||||
pattern: '{react-intl,intl-messageformat}',
|
|
||||||
group: 'builtin',
|
|
||||||
position: 'after',
|
|
||||||
},
|
|
||||||
// Common React utilities
|
|
||||||
{
|
|
||||||
pattern: '{classnames,react-helmet,react-router,react-router-dom}',
|
|
||||||
group: 'external',
|
|
||||||
position: 'before',
|
|
||||||
},
|
|
||||||
// Immutable / Redux / data store
|
|
||||||
{
|
|
||||||
pattern: '{immutable,react-redux,react-immutable-proptypes,react-immutable-pure-component,reselect}',
|
|
||||||
group: 'external',
|
|
||||||
position: 'before',
|
|
||||||
},
|
|
||||||
// Internal packages
|
|
||||||
{
|
|
||||||
pattern: '{mastodon/**}',
|
|
||||||
group: 'internal',
|
|
||||||
position: 'after',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern: '{flavours/glitch-soc/**}',
|
|
||||||
group: 'internal',
|
|
||||||
position: 'after',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
pathGroupsExcludedImportTypes: [],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
// Forbid imports from vanilla in glitch flavour
|
|
||||||
'import/no-restricted-paths': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
zones: [{
|
|
||||||
target: 'app/javascript/flavours/glitch/',
|
|
||||||
from: 'app/javascript/mastodon/',
|
|
||||||
message: 'Import from /flavours/glitch/ instead'
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
'promise/always-return': 'off',
|
|
||||||
'promise/catch-or-return': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
allowFinally: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'promise/no-callback-in-promise': 'off',
|
|
||||||
'promise/no-nesting': 'off',
|
|
||||||
'promise/no-promise-in-callback': 'off',
|
|
||||||
|
|
||||||
'formatjs/blocklist-elements': 'error',
|
|
||||||
'formatjs/enforce-default-message': ['error', 'literal'],
|
|
||||||
'formatjs/enforce-description': 'off', // description values not currently used
|
|
||||||
'formatjs/enforce-id': 'off', // Explicit IDs are used in the project
|
|
||||||
'formatjs/enforce-placeholders': 'off', // Issues in short_number.jsx
|
|
||||||
'formatjs/enforce-plural-rules': 'error',
|
|
||||||
'formatjs/no-camel-case': 'off', // disabledAccount is only non-conforming
|
|
||||||
'formatjs/no-complex-selectors': 'error',
|
|
||||||
'formatjs/no-emoji': 'error',
|
|
||||||
'formatjs/no-id': 'off', // IDs are used for translation keys
|
|
||||||
'formatjs/no-invalid-icu': 'error',
|
|
||||||
'formatjs/no-literal-string-in-jsx': 'off', // Should be looked at, but mainly flagging punctuation outside of strings
|
|
||||||
'formatjs/no-multiple-plurals': 'off', // Only used by hashtag.jsx
|
|
||||||
'formatjs/no-multiple-whitespaces': 'error',
|
|
||||||
'formatjs/no-offset': 'error',
|
|
||||||
'formatjs/no-useless-message': 'error',
|
|
||||||
'formatjs/prefer-formatted-message': 'error',
|
|
||||||
'formatjs/prefer-pound-in-plural': 'error',
|
|
||||||
|
|
||||||
'jsdoc/check-types': 'off',
|
|
||||||
'jsdoc/no-undefined-types': 'off',
|
|
||||||
'jsdoc/require-jsdoc': 'off',
|
|
||||||
'jsdoc/require-param-description': 'off',
|
|
||||||
'jsdoc/require-property-description': 'off',
|
|
||||||
'jsdoc/require-returns-description': 'off',
|
|
||||||
'jsdoc/require-returns': 'off',
|
|
||||||
},
|
|
||||||
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
'*.config.js',
|
|
||||||
'.*rc.js',
|
|
||||||
'ide-helper.js',
|
|
||||||
'config/webpack/**/*',
|
|
||||||
'config/formatjs-formatter.js',
|
|
||||||
],
|
|
||||||
|
|
||||||
env: {
|
|
||||||
commonjs: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
parserOptions: {
|
|
||||||
sourceType: 'script',
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
'import/no-commonjs': 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
'**/*.ts',
|
|
||||||
'**/*.tsx',
|
|
||||||
],
|
|
||||||
|
|
||||||
extends: [
|
|
||||||
'eslint:recommended',
|
|
||||||
'plugin:@typescript-eslint/strict-type-checked',
|
|
||||||
'plugin:@typescript-eslint/stylistic-type-checked',
|
|
||||||
'plugin:react/recommended',
|
|
||||||
'plugin:react-hooks/recommended',
|
|
||||||
'plugin:jsx-a11y/recommended',
|
|
||||||
'plugin:import/recommended',
|
|
||||||
'plugin:import/typescript',
|
|
||||||
'plugin:promise/recommended',
|
|
||||||
'plugin:jsdoc/recommended-typescript',
|
|
||||||
'plugin:prettier/recommended',
|
|
||||||
],
|
|
||||||
|
|
||||||
parserOptions: {
|
|
||||||
project: true,
|
|
||||||
tsconfigRootDir: __dirname,
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
||||||
|
|
||||||
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
|
|
||||||
'@typescript-eslint/consistent-type-exports': 'error',
|
|
||||||
'@typescript-eslint/consistent-type-imports': 'error',
|
|
||||||
"@typescript-eslint/prefer-nullish-coalescing": ['error', {ignorePrimitives: {boolean: true}}],
|
|
||||||
|
|
||||||
'jsdoc/require-jsdoc': 'off',
|
|
||||||
|
|
||||||
// Those rules set stricter rules for TS files
|
|
||||||
// to enforce better practices when converting from JS
|
|
||||||
'import/no-default-export': 'warn',
|
|
||||||
'react/prefer-stateless-function': 'warn',
|
|
||||||
'react/function-component-definition': ['error', { namedComponents: 'arrow-function' }],
|
|
||||||
'react/jsx-uses-react': 'off', // not needed with new JSX transform
|
|
||||||
'react/react-in-jsx-scope': 'off', // not needed with new JSX transform
|
|
||||||
'react/prop-types': 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
'**/__tests__/*.js',
|
|
||||||
'**/__tests__/*.jsx',
|
|
||||||
],
|
|
||||||
|
|
||||||
env: {
|
|
||||||
jest: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
'streaming/**/*',
|
|
||||||
],
|
|
||||||
rules: {
|
|
||||||
'import/no-commonjs': 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
175
.eslintrc.yml
Normal file
175
.eslintrc.yml
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
---
|
||||||
|
root: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
node: true
|
||||||
|
es6: true
|
||||||
|
jest: true
|
||||||
|
|
||||||
|
globals:
|
||||||
|
ATTACHMENT_HOST: false
|
||||||
|
|
||||||
|
parser: babel-eslint
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- react
|
||||||
|
- jsx-a11y
|
||||||
|
- import
|
||||||
|
- promise
|
||||||
|
|
||||||
|
parserOptions:
|
||||||
|
sourceType: module
|
||||||
|
ecmaFeatures:
|
||||||
|
experimentalObjectRestSpread: true
|
||||||
|
jsx: true
|
||||||
|
ecmaVersion: 2018
|
||||||
|
|
||||||
|
settings:
|
||||||
|
import/extensions:
|
||||||
|
- .js
|
||||||
|
import/ignore:
|
||||||
|
- node_modules
|
||||||
|
- \\.(css|scss|json)$
|
||||||
|
import/resolver:
|
||||||
|
node:
|
||||||
|
moduleDirectory:
|
||||||
|
- node_modules
|
||||||
|
- app/javascript
|
||||||
|
|
||||||
|
rules:
|
||||||
|
brace-style: warn
|
||||||
|
comma-dangle:
|
||||||
|
- error
|
||||||
|
- always-multiline
|
||||||
|
comma-spacing:
|
||||||
|
- warn
|
||||||
|
- before: false
|
||||||
|
after: true
|
||||||
|
comma-style:
|
||||||
|
- warn
|
||||||
|
- last
|
||||||
|
consistent-return: error
|
||||||
|
dot-notation: error
|
||||||
|
eqeqeq: error
|
||||||
|
indent:
|
||||||
|
- warn
|
||||||
|
- 2
|
||||||
|
jsx-quotes:
|
||||||
|
- error
|
||||||
|
- prefer-single
|
||||||
|
no-catch-shadow: error
|
||||||
|
no-cond-assign: error
|
||||||
|
no-console:
|
||||||
|
- warn
|
||||||
|
- allow:
|
||||||
|
- error
|
||||||
|
- warn
|
||||||
|
no-fallthrough: error
|
||||||
|
no-irregular-whitespace: error
|
||||||
|
no-mixed-spaces-and-tabs: warn
|
||||||
|
no-nested-ternary: warn
|
||||||
|
no-trailing-spaces: warn
|
||||||
|
no-undef: error
|
||||||
|
no-unreachable: error
|
||||||
|
no-unused-expressions: error
|
||||||
|
no-unused-vars:
|
||||||
|
- error
|
||||||
|
- vars: all
|
||||||
|
args: after-used
|
||||||
|
ignoreRestSiblings: true
|
||||||
|
object-curly-spacing:
|
||||||
|
- error
|
||||||
|
- always
|
||||||
|
padded-blocks:
|
||||||
|
- error
|
||||||
|
- classes: always
|
||||||
|
quotes:
|
||||||
|
- error
|
||||||
|
- single
|
||||||
|
semi: error
|
||||||
|
strict: off
|
||||||
|
valid-typeof: error
|
||||||
|
|
||||||
|
react/jsx-boolean-value: error
|
||||||
|
react/jsx-closing-bracket-location:
|
||||||
|
- error
|
||||||
|
- line-aligned
|
||||||
|
react/jsx-curly-spacing: error
|
||||||
|
react/jsx-equals-spacing: error
|
||||||
|
react/jsx-first-prop-new-line:
|
||||||
|
- error
|
||||||
|
- multiline-multiprop
|
||||||
|
react/jsx-indent:
|
||||||
|
- error
|
||||||
|
- 2
|
||||||
|
react/jsx-no-bind: error
|
||||||
|
react/jsx-no-duplicate-props: error
|
||||||
|
react/jsx-no-undef: error
|
||||||
|
react/jsx-tag-spacing: error
|
||||||
|
react/jsx-uses-react: error
|
||||||
|
react/jsx-uses-vars: error
|
||||||
|
react/jsx-wrap-multilines: error
|
||||||
|
react/no-multi-comp: off
|
||||||
|
react/no-string-refs: error
|
||||||
|
react/prop-types: error
|
||||||
|
react/self-closing-comp: error
|
||||||
|
|
||||||
|
jsx-a11y/accessible-emoji: warn
|
||||||
|
jsx-a11y/alt-text: warn
|
||||||
|
jsx-a11y/anchor-has-content: warn
|
||||||
|
jsx-a11y/anchor-is-valid:
|
||||||
|
- warn
|
||||||
|
- components:
|
||||||
|
- Link
|
||||||
|
- NavLink
|
||||||
|
specialLink:
|
||||||
|
- to
|
||||||
|
aspect:
|
||||||
|
- noHref
|
||||||
|
- invalidHref
|
||||||
|
- preferButton
|
||||||
|
jsx-a11y/aria-activedescendant-has-tabindex: warn
|
||||||
|
jsx-a11y/aria-props: warn
|
||||||
|
jsx-a11y/aria-proptypes: warn
|
||||||
|
jsx-a11y/aria-role: warn
|
||||||
|
jsx-a11y/aria-unsupported-elements: warn
|
||||||
|
jsx-a11y/heading-has-content: warn
|
||||||
|
jsx-a11y/html-has-lang: warn
|
||||||
|
jsx-a11y/iframe-has-title: warn
|
||||||
|
jsx-a11y/img-redundant-alt: warn
|
||||||
|
jsx-a11y/interactive-supports-focus: warn
|
||||||
|
jsx-a11y/label-has-for: off
|
||||||
|
jsx-a11y/mouse-events-have-key-events: warn
|
||||||
|
jsx-a11y/no-access-key: warn
|
||||||
|
jsx-a11y/no-distracting-elements: warn
|
||||||
|
jsx-a11y/no-noninteractive-element-interactions:
|
||||||
|
- warn
|
||||||
|
- handlers:
|
||||||
|
- onClick
|
||||||
|
jsx-a11y/no-onchange: warn
|
||||||
|
jsx-a11y/no-redundant-roles: warn
|
||||||
|
jsx-a11y/no-static-element-interactions:
|
||||||
|
- warn
|
||||||
|
- handlers:
|
||||||
|
- onClick
|
||||||
|
jsx-a11y/role-has-required-aria-props: warn
|
||||||
|
jsx-a11y/role-supports-aria-props: off
|
||||||
|
jsx-a11y/scope: warn
|
||||||
|
jsx-a11y/tabindex-no-positive: warn
|
||||||
|
|
||||||
|
import/extensions:
|
||||||
|
- error
|
||||||
|
- always
|
||||||
|
- js: never
|
||||||
|
import/newline-after-import: error
|
||||||
|
import/no-extraneous-dependencies:
|
||||||
|
- error
|
||||||
|
- devDependencies:
|
||||||
|
- "config/webpack/**"
|
||||||
|
- "app/javascript/mastodon/test_setup.js"
|
||||||
|
- "app/javascript/**/__tests__/**"
|
||||||
|
import/no-unresolved: error
|
||||||
|
import/no-webpack-loader-syntax: error
|
||||||
|
|
||||||
|
promise/catch-or-return: error
|
||||||
32
.github/CODEOWNERS
vendored
Normal file
32
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# CODEOWNERS for tootsuite/mastodon
|
||||||
|
|
||||||
|
# Translators
|
||||||
|
# To add translator, copy these lines, replace `fr` with appropriate language code and replace `@żelipapą` with user's GitHub nickname preceded by `@` sign or e-mail address.
|
||||||
|
# /app/javascript/mastodon/locales/fr.json @żelipapą
|
||||||
|
# /app/views/user_mailer/*.fr.html.erb @żelipapą
|
||||||
|
# /app/views/user_mailer/*.fr.text.erb @żelipapą
|
||||||
|
# /config/locales/*.fr.yml @żelipapą
|
||||||
|
# /config/locales/fr.yml @żelipapą
|
||||||
|
|
||||||
|
# Polish
|
||||||
|
/app/javascript/mastodon/locales/pl.json @m4sk1n
|
||||||
|
/app/views/user_mailer/*.pl.html.erb @m4sk1n
|
||||||
|
/app/views/user_mailer/*.pl.text.erb @m4sk1n
|
||||||
|
/config/locales/*.pl.yml @m4sk1n
|
||||||
|
/config/locales/pl.yml @m4sk1n
|
||||||
|
|
||||||
|
# French
|
||||||
|
/app/javascript/mastodon/locales/fr.json @aldarone
|
||||||
|
/app/javascript/mastodon/locales/whitelist_fr.json @aldarone
|
||||||
|
/app/views/user_mailer/*.fr.html.erb @aldarone
|
||||||
|
/app/views/user_mailer/*.fr.text.erb @aldarone
|
||||||
|
/config/locales/*.fr.yml @aldarone
|
||||||
|
/config/locales/fr.yml @aldarone
|
||||||
|
|
||||||
|
# Dutch
|
||||||
|
/app/javascript/mastodon/locales/nl.json @jeroenpraat
|
||||||
|
/app/javascript/mastodon/locales/whitelist_nl.json @jeroenpraat
|
||||||
|
/app/views/user_mailer/*.nl.html.erb @jeroenpraat
|
||||||
|
/app/views/user_mailer/*.nl.text.erb @jeroenpraat
|
||||||
|
/config/locales/*.nl.yml @jeroenpraat
|
||||||
|
/config/locales/nl.yml @jeroenpraat
|
||||||
76
.github/ISSUE_TEMPLATE/1.web_bug_report.yml
vendored
76
.github/ISSUE_TEMPLATE/1.web_bug_report.yml
vendored
@@ -1,76 +0,0 @@
|
|||||||
name: Bug Report (Web Interface)
|
|
||||||
description: If you are using Mastodon's web interface and something is not working as expected
|
|
||||||
labels: [bug, 'status/to triage', 'area/web interface']
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Make sure that you are submitting a new bug that was not previously reported or already fixed.
|
|
||||||
|
|
||||||
Please use a concise and distinct title for the issue.
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Steps to reproduce the problem
|
|
||||||
description: What were you trying to do?
|
|
||||||
value: |
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Expected behaviour
|
|
||||||
description: What should have happened?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Actual behaviour
|
|
||||||
description: What happened?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Detailed description
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Mastodon instance
|
|
||||||
description: The address of the Mastodon instance where you experienced the issue
|
|
||||||
placeholder: mastodon.social
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Mastodon version
|
|
||||||
description: |
|
|
||||||
This is displayed at the bottom of the About page, eg. `v4.1.2+nightly-20230627`
|
|
||||||
placeholder: v4.1.2
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Browser name and version
|
|
||||||
description: |
|
|
||||||
What browser are you using when getting this bug? Please specify the version as well.
|
|
||||||
placeholder: Firefox 105.0.3
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Operating system
|
|
||||||
description: |
|
|
||||||
What OS are you running? Please specify the version as well.
|
|
||||||
placeholder: macOS 13.4.1
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Technical details
|
|
||||||
description: |
|
|
||||||
Any additional technical details you may have. This can include the full error log, inspector's output…
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
65
.github/ISSUE_TEMPLATE/2.server_bug_report.yml
vendored
65
.github/ISSUE_TEMPLATE/2.server_bug_report.yml
vendored
@@ -1,65 +0,0 @@
|
|||||||
name: Bug Report (server / API)
|
|
||||||
description: |
|
|
||||||
If something is not working as expected, but is not from using the web interface.
|
|
||||||
labels: [bug, 'status/to triage']
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Make sure that you are submitting a new bug that was not previously reported or already fixed.
|
|
||||||
|
|
||||||
Please use a concise and distinct title for the issue.
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Steps to reproduce the problem
|
|
||||||
description: What were you trying to do?
|
|
||||||
value: |
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Expected behaviour
|
|
||||||
description: What should have happened?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Actual behaviour
|
|
||||||
description: What happened?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Detailed description
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Mastodon instance
|
|
||||||
description: The address of the Mastodon instance where you experienced the issue
|
|
||||||
placeholder: mastodon.social
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Mastodon version
|
|
||||||
description: |
|
|
||||||
This is displayed at the bottom of the About page, eg. `v4.1.2+nightly-20230627`
|
|
||||||
placeholder: v4.1.2
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Technical details
|
|
||||||
description: |
|
|
||||||
Any additional technical details you may have, like logs or error traces
|
|
||||||
value: |
|
|
||||||
If this is happening on your own Mastodon server, please fill out those:
|
|
||||||
- Ruby version: (from `ruby --version`, eg. v3.1.2)
|
|
||||||
- Node.js version: (from `node --version`, eg. v18.16.0)
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
22
.github/ISSUE_TEMPLATE/3.feature_request.yml
vendored
22
.github/ISSUE_TEMPLATE/3.feature_request.yml
vendored
@@ -1,22 +0,0 @@
|
|||||||
name: Feature Request
|
|
||||||
description: I have a suggestion
|
|
||||||
labels: [suggestion]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Please use a concise and distinct title for the issue.
|
|
||||||
|
|
||||||
Consider: Could it be implemented as a 3rd party app using the REST API instead?
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Pitch
|
|
||||||
description: Describe your idea for a feature. Make sure it has not already been suggested/implemented/turned down before.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Motivation
|
|
||||||
description: Why do you think this feature is needed? Who would benefit from it?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
12
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
12
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
name: Bug Report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[Issue text goes here].
|
||||||
|
|
||||||
|
* * * *
|
||||||
|
|
||||||
|
- [ ] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
|
||||||
|
- [ ] This bug happens on a [tagged release](https://github.com/tootsuite/mastodon/releases) and not on `master` (If you're a user, don't worry about this).
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +0,0 @@
|
|||||||
blank_issues_enabled: false
|
|
||||||
contact_links:
|
|
||||||
- name: GitHub Discussions
|
|
||||||
url: https://github.com/mastodon/mastodon/discussions
|
|
||||||
about: Please ask and answer questions here.
|
|
||||||
11
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[Issue text goes here].
|
||||||
|
|
||||||
|
* * * *
|
||||||
|
|
||||||
|
- [ ] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
|
||||||
42
.github/actions/setup-javascript/action.yml
vendored
42
.github/actions/setup-javascript/action.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: 'Setup Javascript'
|
|
||||||
description: 'Setup a Javascript environment ready to run the Mastodon code'
|
|
||||||
inputs:
|
|
||||||
onlyProduction:
|
|
||||||
description: Only install production dependencies
|
|
||||||
default: 'false'
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: 'composite'
|
|
||||||
steps:
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
# The following is needed because we can not use `cache: true` for `setup-node`, as it does not support Corepack yet and mess up with the cache location if ran after Node is installed
|
|
||||||
- name: Enable corepack
|
|
||||||
shell: bash
|
|
||||||
run: corepack enable
|
|
||||||
|
|
||||||
- name: Get yarn cache directory path
|
|
||||||
id: yarn-cache-dir-path
|
|
||||||
shell: bash
|
|
||||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Install all yarn packages
|
|
||||||
shell: bash
|
|
||||||
run: yarn install --immutable
|
|
||||||
if: inputs.onlyProduction == 'false'
|
|
||||||
|
|
||||||
- name: Install all production yarn packages
|
|
||||||
shell: bash
|
|
||||||
run: yarn workspaces focus --production
|
|
||||||
if: inputs.onlyProduction != 'false'
|
|
||||||
23
.github/actions/setup-ruby/action.yml
vendored
23
.github/actions/setup-ruby/action.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: 'Setup RUby'
|
|
||||||
description: 'Setup a Ruby environment ready to run the Mastodon code'
|
|
||||||
inputs:
|
|
||||||
ruby-version:
|
|
||||||
description: The Ruby version to install
|
|
||||||
default: '.ruby-version'
|
|
||||||
additional-system-dependencies:
|
|
||||||
description: 'Additional packages to install'
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: 'composite'
|
|
||||||
steps:
|
|
||||||
- name: Install system dependencies
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libicu-dev libidn11-dev ${{ inputs.additional-system-dependencies }}
|
|
||||||
|
|
||||||
- name: Set up Ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: ${{ inputs.ruby-version }}
|
|
||||||
bundler-cache: true
|
|
||||||
13
.github/codecov.yml
vendored
13
.github/codecov.yml
vendored
@@ -1,13 +0,0 @@
|
|||||||
coverage:
|
|
||||||
status:
|
|
||||||
project:
|
|
||||||
default:
|
|
||||||
# Github status check is not blocking
|
|
||||||
informational: true
|
|
||||||
patch:
|
|
||||||
default:
|
|
||||||
# Github status check is not blocking
|
|
||||||
informational: true
|
|
||||||
comment:
|
|
||||||
# Only write a comment in PR if there are changes
|
|
||||||
require_changes: true
|
|
||||||
125
.github/renovate.json5
vendored
125
.github/renovate.json5
vendored
@@ -1,125 +0,0 @@
|
|||||||
{
|
|
||||||
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
|
|
||||||
extends: [
|
|
||||||
'config:recommended',
|
|
||||||
':labels(dependencies)',
|
|
||||||
':prConcurrentLimitNone', // Remove limit for open PRs at any time.
|
|
||||||
':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
|
|
||||||
],
|
|
||||||
minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it
|
|
||||||
// packageRules order is important, they are applied from top to bottom and are merged,
|
|
||||||
// meaning the most important ones must be at the bottom, for example grouping rules
|
|
||||||
// If we do not want a package to be grouped with others, we need to set its groupName
|
|
||||||
// to `null` after any other rule set it to something.
|
|
||||||
dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).',
|
|
||||||
postUpdateOptions: ['yarnDedupeHighest'],
|
|
||||||
packageRules: [
|
|
||||||
{
|
|
||||||
// Require Dependency Dashboard Approval for major version bumps of these node packages
|
|
||||||
matchManagers: ['npm'],
|
|
||||||
matchPackageNames: [
|
|
||||||
'tesseract.js', // Requires code changes
|
|
||||||
'react-hotkeys', // Requires code changes
|
|
||||||
|
|
||||||
// Requires Webpacker upgrade or replacement
|
|
||||||
'@svgr/webpack',
|
|
||||||
'@types/webpack',
|
|
||||||
'babel-loader',
|
|
||||||
'compression-webpack-plugin',
|
|
||||||
'css-loader',
|
|
||||||
'imports-loader',
|
|
||||||
'mini-css-extract-plugin',
|
|
||||||
'postcss-loader',
|
|
||||||
'sass-loader',
|
|
||||||
'terser-webpack-plugin',
|
|
||||||
'webpack',
|
|
||||||
'webpack-assets-manifest',
|
|
||||||
'webpack-bundle-analyzer',
|
|
||||||
'webpack-dev-server',
|
|
||||||
'webpack-cli',
|
|
||||||
|
|
||||||
// react-router: Requires manual upgrade
|
|
||||||
'history',
|
|
||||||
'react-router-dom',
|
|
||||||
],
|
|
||||||
matchUpdateTypes: ['major'],
|
|
||||||
dependencyDashboardApproval: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Require Dependency Dashboard Approval for major version bumps of these Ruby packages
|
|
||||||
matchManagers: ['bundler'],
|
|
||||||
matchPackageNames: [
|
|
||||||
'rack', // Needs to be synced with Rails version
|
|
||||||
'sprockets', // Requires manual upgrade https://github.com/rails/sprockets/blob/master/UPGRADING.md#guide-to-upgrading-from-sprockets-3x-to-4x
|
|
||||||
'strong_migrations', // Requires manual upgrade
|
|
||||||
'sidekiq', // Requires manual upgrade
|
|
||||||
'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version
|
|
||||||
'redis', // Requires manual upgrade and sync with Sidekiq version
|
|
||||||
],
|
|
||||||
matchUpdateTypes: ['major'],
|
|
||||||
dependencyDashboardApproval: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Update Github Actions and Docker images weekly
|
|
||||||
matchManagers: ['github-actions', 'dockerfile', 'docker-compose'],
|
|
||||||
extends: ['schedule:weekly'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Require Dependency Dashboard Approval for major & minor bumps for the ruby image, this needs to be synced with .ruby-version
|
|
||||||
matchManagers: ['dockerfile'],
|
|
||||||
matchPackageNames: ['moritzheiber/ruby-jemalloc'],
|
|
||||||
matchUpdateTypes: ['minor', 'major'],
|
|
||||||
dependencyDashboardApproval: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Require Dependency Dashboard Approval for major bumps for the node image, this needs to be synced with .nvmrc
|
|
||||||
matchManagers: ['dockerfile'],
|
|
||||||
matchPackageNames: ['node'],
|
|
||||||
matchUpdateTypes: ['major'],
|
|
||||||
dependencyDashboardApproval: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Require Dependency Dashboard Approval for major postgres bumps in the docker-compose file, as those break dev environments
|
|
||||||
matchManagers: ['docker-compose'],
|
|
||||||
matchPackageNames: ['postgres'],
|
|
||||||
matchUpdateTypes: ['major'],
|
|
||||||
dependencyDashboardApproval: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Update devDependencies every week, with one grouped PR
|
|
||||||
matchDepTypes: 'devDependencies',
|
|
||||||
matchUpdateTypes: ['patch', 'minor'],
|
|
||||||
groupName: 'devDependencies (non-major)',
|
|
||||||
extends: ['schedule:weekly'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Group all eslint-related packages with `eslint` in the same PR
|
|
||||||
matchManagers: ['npm'],
|
|
||||||
matchPackageNames: ['eslint'],
|
|
||||||
matchPackagePrefixes: ['eslint-', '@typescript-eslint/'],
|
|
||||||
matchUpdateTypes: ['patch', 'minor'],
|
|
||||||
groupName: 'eslint (non-major)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Update @types/* packages every week, with one grouped PR
|
|
||||||
matchPackagePrefixes: '@types/',
|
|
||||||
matchUpdateTypes: ['patch', 'minor'],
|
|
||||||
groupName: 'DefinitelyTyped types (non-major)',
|
|
||||||
extends: ['schedule:weekly'],
|
|
||||||
addLabels: ['typescript'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// We want those packages to always have their own PR
|
|
||||||
matchManagers: ['npm'],
|
|
||||||
matchPackageNames: [
|
|
||||||
'typescript', // Typescript has code-impacting changes in minor versions
|
|
||||||
],
|
|
||||||
groupName: null, // We dont want them to belong to any group
|
|
||||||
},
|
|
||||||
// Add labels depending on package manager
|
|
||||||
{ matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] },
|
|
||||||
{ matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] },
|
|
||||||
{ matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] },
|
|
||||||
{ matchManagers: ['github-actions'], addLabels: ['github_actions'] },
|
|
||||||
],
|
|
||||||
}
|
|
||||||
10
.github/stale.yml
vendored
10
.github/stale.yml
vendored
@@ -1,10 +0,0 @@
|
|||||||
daysUntilStale: 120
|
|
||||||
daysUntilClose: 7
|
|
||||||
exemptLabels:
|
|
||||||
- security
|
|
||||||
staleLabel: wontfix
|
|
||||||
markComment: >
|
|
||||||
This issue has been automatically marked as stale because it has not had
|
|
||||||
recent activity. It will be closed if no further activity occurs. Thank you
|
|
||||||
for your contributions.
|
|
||||||
only: pulls
|
|
||||||
21
.github/stylelint-matcher.json
vendored
21
.github/stylelint-matcher.json
vendored
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "stylelint",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^([^\\s].*)$",
|
|
||||||
"file": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"regexp": "^\\s+((\\d+):(\\d+))?\\s+(✖|×)\\s+(.*)\\s{2,}(.*)$",
|
|
||||||
"line": 2,
|
|
||||||
"column": 3,
|
|
||||||
"message": 5,
|
|
||||||
"code": 6,
|
|
||||||
"loop": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
99
.github/workflows/build-container-image.yml
vendored
99
.github/workflows/build-container-image.yml
vendored
@@ -1,99 +0,0 @@
|
|||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
platforms:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
cache:
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
use_native_arm64_builder:
|
|
||||||
type: boolean
|
|
||||||
push_to_images:
|
|
||||||
type: string
|
|
||||||
version_prerelease:
|
|
||||||
type: string
|
|
||||||
version_metadata:
|
|
||||||
type: string
|
|
||||||
flavor:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
type: string
|
|
||||||
labels:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: docker/setup-qemu-action@v3
|
|
||||||
if: contains(inputs.platforms, 'linux/arm64') && !inputs.use_native_arm64_builder
|
|
||||||
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
|
||||||
id: buildx
|
|
||||||
if: ${{ !(inputs.use_native_arm64_builder && contains(inputs.platforms, 'linux/arm64')) }}
|
|
||||||
|
|
||||||
- name: Start a local Docker Builder
|
|
||||||
if: inputs.use_native_arm64_builder && contains(inputs.platforms, 'linux/arm64')
|
|
||||||
run: |
|
|
||||||
docker run --rm -d --name buildkitd -p 1234:1234 --privileged moby/buildkit:latest --addr tcp://0.0.0.0:1234
|
|
||||||
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
|
||||||
id: buildx-native
|
|
||||||
if: inputs.use_native_arm64_builder && contains(inputs.platforms, 'linux/arm64')
|
|
||||||
with:
|
|
||||||
driver: remote
|
|
||||||
endpoint: tcp://localhost:1234
|
|
||||||
platforms: linux/amd64
|
|
||||||
append: |
|
|
||||||
- endpoint: tcp://${{ vars.DOCKER_BUILDER_HETZNER_ARM64_01_HOST }}:13865
|
|
||||||
platforms: linux/arm64
|
|
||||||
name: mastodon-docker-builder-arm64-01
|
|
||||||
driver-opts:
|
|
||||||
- servername=mastodon-docker-builder-arm64-01
|
|
||||||
env:
|
|
||||||
BUILDER_NODE_1_AUTH_TLS_CACERT: ${{ secrets.DOCKER_BUILDER_HETZNER_ARM64_01_CACERT }}
|
|
||||||
BUILDER_NODE_1_AUTH_TLS_CERT: ${{ secrets.DOCKER_BUILDER_HETZNER_ARM64_01_CERT }}
|
|
||||||
BUILDER_NODE_1_AUTH_TLS_KEY: ${{ secrets.DOCKER_BUILDER_HETZNER_ARM64_01_KEY }}
|
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
|
||||||
if: contains(inputs.push_to_images, 'tootsuite')
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Log in to the Github Container registry
|
|
||||||
if: contains(inputs.push_to_images, 'ghcr.io')
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- uses: docker/metadata-action@v5
|
|
||||||
id: meta
|
|
||||||
if: ${{ inputs.push_to_images != '' }}
|
|
||||||
with:
|
|
||||||
images: ${{ inputs.push_to_images }}
|
|
||||||
flavor: ${{ inputs.flavor }}
|
|
||||||
tags: ${{ inputs.tags }}
|
|
||||||
labels: ${{ inputs.labels }}
|
|
||||||
|
|
||||||
- uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
build-args: |
|
|
||||||
MASTODON_VERSION_PRERELEASE=${{ inputs.version_prerelease }}
|
|
||||||
MASTODON_VERSION_METADATA=${{ inputs.version_metadata }}
|
|
||||||
platforms: ${{ inputs.platforms }}
|
|
||||||
provenance: false
|
|
||||||
builder: ${{ steps.buildx.outputs.name || steps.buildx-native.outputs.name }}
|
|
||||||
push: ${{ inputs.push_to_images != '' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: ${{ inputs.cache && 'type=gha' || '' }}
|
|
||||||
cache-to: ${{ inputs.cache && 'type=gha,mode=max' || '' }}
|
|
||||||
42
.github/workflows/build-nightly.yml
vendored
42
.github/workflows/build-nightly.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: Build nightly container image
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 2 * * *' # run at 2 AM UTC
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
compute-suffix:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'glitch-soc/mastodon'
|
|
||||||
steps:
|
|
||||||
- id: version_vars
|
|
||||||
env:
|
|
||||||
TZ: Etc/UTC
|
|
||||||
run: |
|
|
||||||
echo mastodon_version_prerelease=nightly.$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
|
|
||||||
outputs:
|
|
||||||
prerelease: ${{ steps.version_vars.outputs.mastodon_version_prerelease }}
|
|
||||||
|
|
||||||
build-image:
|
|
||||||
needs: compute-suffix
|
|
||||||
uses: ./.github/workflows/build-container-image.yml
|
|
||||||
with:
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
use_native_arm64_builder: false
|
|
||||||
cache: false
|
|
||||||
push_to_images: |
|
|
||||||
ghcr.io/${{ github.repository_owner }}/mastodon
|
|
||||||
version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
|
|
||||||
labels: |
|
|
||||||
org.opencontainers.image.description=Nightly build image used for testing purposes
|
|
||||||
flavor: |
|
|
||||||
latest=true
|
|
||||||
tags: |
|
|
||||||
type=raw,value=edge
|
|
||||||
type=raw,value=nightly
|
|
||||||
type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
|
|
||||||
secrets: inherit
|
|
||||||
41
.github/workflows/build-push-pr.yml
vendored
41
.github/workflows/build-push-pr.yml
vendored
@@ -1,41 +0,0 @@
|
|||||||
name: Build container image for PR
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [labeled, synchronize, reopened, ready_for_review, opened]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
compute-suffix:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# This is only allowed to run if:
|
|
||||||
# - the PR branch is in the `mastodon/mastodon` repository
|
|
||||||
# - the PR is not a draft
|
|
||||||
# - the PR has the "build-image" label
|
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && !github.event.pull_request.draft && contains(github.event.pull_request.labels.*.name, 'build-image') }}
|
|
||||||
steps:
|
|
||||||
# Repository needs to be cloned so `git rev-parse` below works
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- id: version_vars
|
|
||||||
run: |
|
|
||||||
echo mastodon_version_metadata=pr-${{ github.event.pull_request.number }}-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
|
|
||||||
outputs:
|
|
||||||
metadata: ${{ steps.version_vars.outputs.mastodon_version_metadata }}
|
|
||||||
|
|
||||||
build-image:
|
|
||||||
needs: compute-suffix
|
|
||||||
uses: ./.github/workflows/build-container-image.yml
|
|
||||||
with:
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
use_native_arm64_builder: false
|
|
||||||
push_to_images: |
|
|
||||||
ghcr.io/${{ github.repository_owner }}/mastodon
|
|
||||||
version_metadata: ${{ needs.compute-suffix.outputs.metadata }}
|
|
||||||
flavor: |
|
|
||||||
latest=auto
|
|
||||||
tags: |
|
|
||||||
type=ref,event=pr
|
|
||||||
secrets: inherit
|
|
||||||
28
.github/workflows/build-releases.yml
vendored
28
.github/workflows/build-releases.yml
vendored
@@ -1,28 +0,0 @@
|
|||||||
name: Build container release images
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-image:
|
|
||||||
uses: ./.github/workflows/build-container-image.yml
|
|
||||||
with:
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
use_native_arm64_builder: false
|
|
||||||
push_to_images: |
|
|
||||||
ghcr.io/${{ github.repository_owner }}/mastodon
|
|
||||||
# Do not use cache when building releases, so apt update is always ran and the release always contain the latest packages
|
|
||||||
cache: false
|
|
||||||
# Only tag with latest when ran against the latest stable branch
|
|
||||||
# This needs to be updated after each minor version release
|
|
||||||
flavor: |
|
|
||||||
latest=${{ startsWith(github.ref, 'refs/tags/v4.2.') }}
|
|
||||||
tags: |
|
|
||||||
type=pep440,pattern={{raw}}
|
|
||||||
type=pep440,pattern=v{{major}}.{{minor}}
|
|
||||||
secrets: inherit
|
|
||||||
34
.github/workflows/bundler-audit.yml
vendored
34
.github/workflows/bundler-audit.yml
vendored
@@ -1,34 +0,0 @@
|
|||||||
name: Bundler Audit
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
paths:
|
|
||||||
- 'Gemfile*'
|
|
||||||
- '.ruby-version'
|
|
||||||
- '.bundler-audit.yml'
|
|
||||||
- '.github/workflows/bundler-audit.yml'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'Gemfile*'
|
|
||||||
- '.ruby-version'
|
|
||||||
- '.bundler-audit.yml'
|
|
||||||
- '.github/workflows/bundler-audit.yml'
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
- cron: '0 5 * * 1'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
security:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Run bundler-audit
|
|
||||||
run: bundle exec bundler-audit
|
|
||||||
48
.github/workflows/check-i18n.yml
vendored
48
.github/workflows/check-i18n.yml
vendored
@@ -1,48 +0,0 @@
|
|||||||
name: Check i18n
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
RAILS_ENV: test
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-i18n:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: Check for missing strings in English JSON
|
|
||||||
run: |
|
|
||||||
yarn i18n:extract --throws
|
|
||||||
git diff --exit-code
|
|
||||||
|
|
||||||
- name: Check locale file normalization
|
|
||||||
run: bundle exec i18n-tasks check-normalized
|
|
||||||
|
|
||||||
- name: Check for unused strings
|
|
||||||
run: bundle exec i18n-tasks unused
|
|
||||||
|
|
||||||
- name: Check for missing strings in English YML
|
|
||||||
run: |
|
|
||||||
bundle exec i18n-tasks add-missing -l en
|
|
||||||
git diff --exit-code
|
|
||||||
|
|
||||||
- name: Check for wrong string interpolations
|
|
||||||
run: bundle exec i18n-tasks check-consistent-interpolations
|
|
||||||
|
|
||||||
- name: Check that all required locale files exist
|
|
||||||
run: bundle exec rake repo:check_locales_files
|
|
||||||
62
.github/workflows/codeql.yml
vendored
62
.github/workflows/codeql.yml
vendored
@@ -1,62 +0,0 @@
|
|||||||
name: 'CodeQL'
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ['main']
|
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: ['main']
|
|
||||||
schedule:
|
|
||||||
- cron: '22 6 * * 1'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
language: ['javascript', 'ruby']
|
|
||||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
||||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v2
|
|
||||||
with:
|
|
||||||
languages: ${{ matrix.language }}
|
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
||||||
# By default, queries listed here will override any specified in a config file.
|
|
||||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
||||||
|
|
||||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
||||||
# queries: security-extended,security-and-quality
|
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v2
|
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
||||||
|
|
||||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
||||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
||||||
|
|
||||||
# - run: |
|
|
||||||
# echo "Run, Build Application using script"
|
|
||||||
# ./location_of_script_within_repo/buildscript.sh
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v2
|
|
||||||
with:
|
|
||||||
category: '/language:${{matrix.language}}'
|
|
||||||
72
.github/workflows/crowdin-download.yml
vendored
72
.github/workflows/crowdin-download.yml
vendored
@@ -1,72 +0,0 @@
|
|||||||
name: Crowdin / Download translations
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '17 4 * * *' # Every day
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
download-translations:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'glitch-soc/mastodon'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Increase Git http.postBuffer
|
|
||||||
# This is needed due to a bug in Ubuntu's cURL version?
|
|
||||||
# See https://github.com/orgs/community/discussions/55820
|
|
||||||
run: |
|
|
||||||
git config --global http.version HTTP/1.1
|
|
||||||
git config --global http.postBuffer 157286400
|
|
||||||
|
|
||||||
# Download the translation files from Crowdin
|
|
||||||
- name: crowdin action
|
|
||||||
uses: crowdin/github-action@v1
|
|
||||||
with:
|
|
||||||
config: crowdin-glitch.yml
|
|
||||||
upload_sources: false
|
|
||||||
upload_translations: false
|
|
||||||
download_translations: true
|
|
||||||
crowdin_branch_name: main
|
|
||||||
push_translations: false
|
|
||||||
create_pull_request: false
|
|
||||||
env:
|
|
||||||
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
|
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
|
||||||
|
|
||||||
# As the files are extracted from a Docker container, they belong to root:root
|
|
||||||
# We need to fix this before the next steps
|
|
||||||
- name: Fix file permissions
|
|
||||||
run: sudo chown -R runner:docker .
|
|
||||||
|
|
||||||
# This is needed to run the normalize step
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Run i18n normalize task
|
|
||||||
run: bundle exec i18n-tasks normalize
|
|
||||||
|
|
||||||
# Create or update the pull request
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v5.0.2
|
|
||||||
with:
|
|
||||||
commit-message: 'New Crowdin translations'
|
|
||||||
title: 'New Crowdin Translations (automated)'
|
|
||||||
author: 'GitHub Actions <noreply@github.com>'
|
|
||||||
body: |
|
|
||||||
New Crowdin translations, automated with Github Actions
|
|
||||||
|
|
||||||
See `.github/workflows/crowdin-download.yml`
|
|
||||||
|
|
||||||
This PR will be updated every day with new translations.
|
|
||||||
|
|
||||||
Due to a limitation in Github Actions, checks are not running on this PR without manual action.
|
|
||||||
If you want to run the checks, then close and re-open it.
|
|
||||||
branch: i18n/crowdin/translations
|
|
||||||
base: main
|
|
||||||
labels: i18n
|
|
||||||
36
.github/workflows/crowdin-upload.yml
vendored
36
.github/workflows/crowdin-upload.yml
vendored
@@ -1,36 +0,0 @@
|
|||||||
name: Crowdin / Upload translations
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- crowdin.yml
|
|
||||||
- app/javascript/mastodon/locales/en.json
|
|
||||||
- config/locales/en.yml
|
|
||||||
- config/locales/simple_form.en.yml
|
|
||||||
- config/locales/activerecord.en.yml
|
|
||||||
- config/locales/devise.en.yml
|
|
||||||
- config/locales/doorkeeper.en.yml
|
|
||||||
- .github/workflows/crowdin-upload.yml
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload-translations:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: crowdin action
|
|
||||||
uses: crowdin/github-action@v1
|
|
||||||
with:
|
|
||||||
config: crowdin-glitch.yml
|
|
||||||
upload_sources: true
|
|
||||||
upload_translations: false
|
|
||||||
download_translations: false
|
|
||||||
crowdin_branch_name: main
|
|
||||||
|
|
||||||
env:
|
|
||||||
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
|
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
|
||||||
17
.github/workflows/haml-lint-problem-matcher.json
vendored
17
.github/workflows/haml-lint-problem-matcher.json
vendored
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "haml-lint",
|
|
||||||
"severity": "warning",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^(.*):(\\d+)\\s\\[W]\\s(.*):\\s(.*)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"code": 3,
|
|
||||||
"message": 4
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
46
.github/workflows/lint-css.yml
vendored
46
.github/workflows/lint-css.yml
vendored
@@ -1,46 +0,0 @@
|
|||||||
name: CSS Linting
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- 'stylelint.config.js'
|
|
||||||
- '**/*.css'
|
|
||||||
- '**/*.scss'
|
|
||||||
- '.github/workflows/lint-css.yml'
|
|
||||||
- '.github/stylelint-matcher.json'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- 'stylelint.config.js'
|
|
||||||
- '**/*.css'
|
|
||||||
- '**/*.scss'
|
|
||||||
- '.github/workflows/lint-css.yml'
|
|
||||||
- '.github/stylelint-matcher.json'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- uses: xt0rted/stylelint-problem-matcher@v1
|
|
||||||
|
|
||||||
- run: echo "::add-matcher::.github/stylelint-matcher.json"
|
|
||||||
|
|
||||||
- name: Stylelint
|
|
||||||
run: yarn lint:sass
|
|
||||||
39
.github/workflows/lint-haml.yml
vendored
39
.github/workflows/lint-haml.yml
vendored
@@ -1,39 +0,0 @@
|
|||||||
name: Haml Linting
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/haml-lint-problem-matcher.json'
|
|
||||||
- '.github/workflows/lint-haml.yml'
|
|
||||||
- '.haml-lint*.yml'
|
|
||||||
- '.rubocop*.yml'
|
|
||||||
- '.ruby-version'
|
|
||||||
- '**/*.haml'
|
|
||||||
- 'Gemfile*'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/haml-lint-problem-matcher.json'
|
|
||||||
- '.github/workflows/lint-haml.yml'
|
|
||||||
- '.haml-lint*.yml'
|
|
||||||
- '.rubocop*.yml'
|
|
||||||
- '.ruby-version'
|
|
||||||
- '**/*.haml'
|
|
||||||
- 'Gemfile*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Run haml-lint
|
|
||||||
run: |
|
|
||||||
echo "::add-matcher::.github/workflows/haml-lint-problem-matcher.json"
|
|
||||||
bundle exec haml-lint
|
|
||||||
49
.github/workflows/lint-js.yml
vendored
49
.github/workflows/lint-js.yml
vendored
@@ -1,49 +0,0 @@
|
|||||||
name: JavaScript Linting
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- 'tsconfig.json'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '.eslint*'
|
|
||||||
- '**/*.js'
|
|
||||||
- '**/*.jsx'
|
|
||||||
- '**/*.ts'
|
|
||||||
- '**/*.tsx'
|
|
||||||
- '.github/workflows/lint-js.yml'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- 'tsconfig.json'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '.eslint*'
|
|
||||||
- '**/*.js'
|
|
||||||
- '**/*.jsx'
|
|
||||||
- '**/*.ts'
|
|
||||||
- '**/*.tsx'
|
|
||||||
- '.github/workflows/lint-js.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: ESLint
|
|
||||||
run: yarn lint:js --max-warnings 0
|
|
||||||
|
|
||||||
- name: Typecheck
|
|
||||||
run: yarn typecheck
|
|
||||||
38
.github/workflows/lint-json.yml
vendored
38
.github/workflows/lint-json.yml
vendored
@@ -1,38 +0,0 @@
|
|||||||
name: JSON Linting
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '**/*.json'
|
|
||||||
- '.github/workflows/lint-json.yml'
|
|
||||||
- '!app/javascript/mastodon/locales/*.json'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '**/*.json'
|
|
||||||
- '.github/workflows/lint-json.yml'
|
|
||||||
- '!app/javascript/mastodon/locales/*.json'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: Prettier
|
|
||||||
run: yarn lint:json
|
|
||||||
38
.github/workflows/lint-md.yml
vendored
38
.github/workflows/lint-md.yml
vendored
@@ -1,38 +0,0 @@
|
|||||||
name: Markdown Linting
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/lint-md.yml'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '**/*.md'
|
|
||||||
- '!AUTHORS.md'
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/lint-md.yml'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '**/*.md'
|
|
||||||
- '!AUTHORS.md'
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: Prettier
|
|
||||||
run: yarn lint:md
|
|
||||||
45
.github/workflows/lint-ruby.yml
vendored
45
.github/workflows/lint-ruby.yml
vendored
@@ -1,45 +0,0 @@
|
|||||||
name: Ruby Linting
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- 'Gemfile*'
|
|
||||||
- '.rubocop*.yml'
|
|
||||||
- '.ruby-version'
|
|
||||||
- 'config/brakeman.ignore'
|
|
||||||
- '**/*.rb'
|
|
||||||
- '**/*.rake'
|
|
||||||
- '.github/workflows/lint-ruby.yml'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'Gemfile*'
|
|
||||||
- '.rubocop*.yml'
|
|
||||||
- '.ruby-version'
|
|
||||||
- 'config/brakeman.ignore'
|
|
||||||
- '**/*.rb'
|
|
||||||
- '**/*.rake'
|
|
||||||
- '.github/workflows/lint-ruby.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Set-up RuboCop Problem Matcher
|
|
||||||
uses: r7kamura/rubocop-problem-matchers-action@v1
|
|
||||||
|
|
||||||
- name: Run rubocop
|
|
||||||
run: bundle exec rubocop
|
|
||||||
|
|
||||||
- name: Run brakeman
|
|
||||||
if: always() # Run both checks, even if the first failed
|
|
||||||
run: bundle exec brakeman
|
|
||||||
40
.github/workflows/lint-yml.yml
vendored
40
.github/workflows/lint-yml.yml
vendored
@@ -1,40 +0,0 @@
|
|||||||
name: YML Linting
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '**/*.yaml'
|
|
||||||
- '**/*.yml'
|
|
||||||
- '.github/workflows/lint-yml.yml'
|
|
||||||
- '!config/locales/*.yml'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '.prettier*'
|
|
||||||
- '**/*.yaml'
|
|
||||||
- '**/*.yml'
|
|
||||||
- '.github/workflows/lint-yml.yml'
|
|
||||||
- '!config/locales/*.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: Prettier
|
|
||||||
run: yarn lint:yml
|
|
||||||
27
.github/workflows/rebase-needed.yml
vendored
27
.github/workflows/rebase-needed.yml
vendored
@@ -1,27 +0,0 @@
|
|||||||
name: PR Needs Rebase
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 * * * *'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
label-rebase-needed:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check for merge conflicts
|
|
||||||
uses: eps1lon/actions-label-merge-conflict@releases/2.x
|
|
||||||
with:
|
|
||||||
dirtyLabel: 'rebase needed :construction:'
|
|
||||||
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
commentOnClean: This pull request has resolved merge conflicts and is ready for review.
|
|
||||||
commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged.
|
|
||||||
retryMax: 30
|
|
||||||
continueOnMissingPermissions: false
|
|
||||||
21
.github/workflows/test-image-build.yml
vendored
21
.github/workflows/test-image-build.yml
vendored
@@ -1,21 +0,0 @@
|
|||||||
name: Test container image build
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- .github/workflows/build-nightly.yml
|
|
||||||
- .github/workflows/build-push-pr.yml
|
|
||||||
- .github/workflows/build-releases.yml
|
|
||||||
- .github/workflows/test-image-build.yml
|
|
||||||
- Dockerfile
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-image:
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
uses: ./.github/workflows/build-container-image.yml
|
|
||||||
with:
|
|
||||||
platforms: linux/amd64 # Testing only on native platform so it is performant
|
|
||||||
42
.github/workflows/test-js.yml
vendored
42
.github/workflows/test-js.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: JavaScript Testing
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '**/*.js'
|
|
||||||
- '**/*.jsx'
|
|
||||||
- '**/*.ts'
|
|
||||||
- '**/*.tsx'
|
|
||||||
- '**/*.snap'
|
|
||||||
- '.github/workflows/test-js.yml'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'package.json'
|
|
||||||
- 'yarn.lock'
|
|
||||||
- '.nvmrc'
|
|
||||||
- '**/*.js'
|
|
||||||
- '**/*.jsx'
|
|
||||||
- '**/*.ts'
|
|
||||||
- '**/*.tsx'
|
|
||||||
- '**/*.snap'
|
|
||||||
- '.github/workflows/test-js.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: Jest testing
|
|
||||||
run: yarn jest --reporters github-actions summary
|
|
||||||
103
.github/workflows/test-migrations-one-step.yml
vendored
103
.github/workflows/test-migrations-one-step.yml
vendored
@@ -1,103 +0,0 @@
|
|||||||
name: Test one step migrations
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pre_job:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- id: skip_check
|
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
|
||||||
with:
|
|
||||||
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations-one-step.yml", "lib/tasks/tests.rake"]'
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre_job
|
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
postgres:
|
|
||||||
- 14-alpine
|
|
||||||
- 15-alpine
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:${{ matrix.postgres}}
|
|
||||||
env:
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
options: >-
|
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:7-alpine
|
|
||||||
options: >-
|
|
||||||
--health-cmd "redis-cli ping"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
|
|
||||||
env:
|
|
||||||
CONTINUOUS_INTEGRATION: true
|
|
||||||
DB_HOST: localhost
|
|
||||||
DB_USER: postgres
|
|
||||||
DB_PASS: postgres
|
|
||||||
DISABLE_SIMPLECOV: true
|
|
||||||
RAILS_ENV: test
|
|
||||||
BUNDLE_CLEAN: true
|
|
||||||
BUNDLE_FROZEN: true
|
|
||||||
BUNDLE_WITHOUT: 'development production'
|
|
||||||
BUNDLE_JOBS: 3
|
|
||||||
BUNDLE_RETRY: 3
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Create database
|
|
||||||
run: './bin/rails db:create'
|
|
||||||
|
|
||||||
- name: Run migrations up to v2.0.0
|
|
||||||
run: './bin/rails db:migrate VERSION=20171010025614'
|
|
||||||
|
|
||||||
- name: Populate database with test data
|
|
||||||
run: './bin/rails tests:migrations:populate_v2'
|
|
||||||
|
|
||||||
- name: Run migrations up to v2.4.0
|
|
||||||
run: './bin/rails db:migrate VERSION=20180514140000'
|
|
||||||
|
|
||||||
- name: Populate database with test data
|
|
||||||
run: './bin/rails tests:migrations:populate_v2_4'
|
|
||||||
|
|
||||||
- name: Run migrations up to v2.4.3
|
|
||||||
run: './bin/rails db:migrate VERSION=20180707154237'
|
|
||||||
|
|
||||||
- name: Populate database with test data
|
|
||||||
run: './bin/rails tests:migrations:populate_v2_4_3'
|
|
||||||
|
|
||||||
- name: Run all remaining migrations
|
|
||||||
run: './bin/rails db:migrate'
|
|
||||||
|
|
||||||
- name: Check migration result
|
|
||||||
run: './bin/rails tests:migrations:check_database'
|
|
||||||
111
.github/workflows/test-migrations-two-step.yml
vendored
111
.github/workflows/test-migrations-two-step.yml
vendored
@@ -1,111 +0,0 @@
|
|||||||
name: Test two step migrations
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pre_job:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- id: skip_check
|
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
|
||||||
with:
|
|
||||||
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations-two-step.yml", "lib/tasks/tests.rake"]'
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre_job
|
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
postgres:
|
|
||||||
- 14-alpine
|
|
||||||
- 15-alpine
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:${{ matrix.postgres}}
|
|
||||||
env:
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
options: >-
|
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
redis:
|
|
||||||
image: redis:7-alpine
|
|
||||||
options: >-
|
|
||||||
--health-cmd "redis-cli ping"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
|
|
||||||
env:
|
|
||||||
CONTINUOUS_INTEGRATION: true
|
|
||||||
DB_HOST: localhost
|
|
||||||
DB_USER: postgres
|
|
||||||
DB_PASS: postgres
|
|
||||||
DISABLE_SIMPLECOV: true
|
|
||||||
RAILS_ENV: test
|
|
||||||
BUNDLE_CLEAN: true
|
|
||||||
BUNDLE_FROZEN: true
|
|
||||||
BUNDLE_WITHOUT: 'development production'
|
|
||||||
BUNDLE_JOBS: 3
|
|
||||||
BUNDLE_RETRY: 3
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Create database
|
|
||||||
run: './bin/rails db:create'
|
|
||||||
|
|
||||||
- name: Run migrations up to v2.0.0
|
|
||||||
run: './bin/rails db:migrate VERSION=20171010025614'
|
|
||||||
|
|
||||||
- name: Populate database with test data
|
|
||||||
run: './bin/rails tests:migrations:populate_v2'
|
|
||||||
|
|
||||||
- name: Run pre-deployment migrations up to v2.4.0
|
|
||||||
run: './bin/rails db:migrate VERSION=20180514140000'
|
|
||||||
env:
|
|
||||||
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
|
||||||
|
|
||||||
- name: Populate database with test data
|
|
||||||
run: './bin/rails tests:migrations:populate_v2_4'
|
|
||||||
|
|
||||||
- name: Run migrations up to v2.4.3
|
|
||||||
run: './bin/rails db:migrate VERSION=20180707154237'
|
|
||||||
env:
|
|
||||||
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
|
||||||
|
|
||||||
- name: Populate database with test data
|
|
||||||
run: './bin/rails tests:migrations:populate_v2_4_3'
|
|
||||||
|
|
||||||
- name: Run all remaining pre-deployment migrations
|
|
||||||
run: './bin/rails db:migrate'
|
|
||||||
env:
|
|
||||||
SKIP_POST_DEPLOYMENT_MIGRATIONS: true
|
|
||||||
|
|
||||||
- name: Run all post-deployment migrations
|
|
||||||
run: './bin/rails db:migrate'
|
|
||||||
|
|
||||||
- name: Check migration result
|
|
||||||
run: './bin/rails tests:migrations:check_database'
|
|
||||||
331
.github/workflows/test-ruby.yml
vendored
331
.github/workflows/test-ruby.yml
vendored
@@ -1,331 +0,0 @@
|
|||||||
name: Ruby Testing
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**'
|
|
||||||
- 'renovate/**'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUNDLE_CLEAN: true
|
|
||||||
BUNDLE_FROZEN: true
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
mode:
|
|
||||||
- production
|
|
||||||
- test
|
|
||||||
env:
|
|
||||||
RAILS_ENV: ${{ matrix.mode }}
|
|
||||||
BUNDLE_WITH: ${{ matrix.mode }}
|
|
||||||
OTP_SECRET: precompile_placeholder
|
|
||||||
SECRET_KEY_BASE: precompile_placeholder
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
with:
|
|
||||||
onlyProduction: 'true'
|
|
||||||
|
|
||||||
- name: Precompile assets
|
|
||||||
# Previously had set this, but it's not supported
|
|
||||||
# export NODE_OPTIONS=--openssl-legacy-provider
|
|
||||||
run: |-
|
|
||||||
./bin/rails assets:precompile
|
|
||||||
|
|
||||||
- name: Archive asset artifacts
|
|
||||||
run: |
|
|
||||||
tar --exclude={"*.br","*.gz"} -zcf artifacts.tar.gz public/assets public/packs*
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
if: matrix.mode == 'test'
|
|
||||||
with:
|
|
||||||
path: |-
|
|
||||||
./artifacts.tar.gz
|
|
||||||
name: ${{ github.sha }}
|
|
||||||
retention-days: 0
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:14-alpine
|
|
||||||
env:
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
options: >-
|
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:7-alpine
|
|
||||||
options: >-
|
|
||||||
--health-cmd "redis-cli ping"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
|
|
||||||
env:
|
|
||||||
DB_HOST: localhost
|
|
||||||
DB_USER: postgres
|
|
||||||
DB_PASS: postgres
|
|
||||||
DISABLE_SIMPLECOV: ${{ matrix.ruby-version != '.ruby-version' }}
|
|
||||||
RAILS_ENV: test
|
|
||||||
ALLOW_NOPAM: true
|
|
||||||
PAM_ENABLED: true
|
|
||||||
PAM_DEFAULT_SERVICE: pam_test
|
|
||||||
PAM_CONTROLLED_SERVICE: pam_test_controlled
|
|
||||||
OIDC_ENABLED: true
|
|
||||||
OIDC_SCOPE: read
|
|
||||||
SAML_ENABLED: true
|
|
||||||
CAS_ENABLED: true
|
|
||||||
BUNDLE_WITH: 'pam_authentication test'
|
|
||||||
GITHUB_RSPEC: ${{ matrix.ruby-version == '.ruby-version' && github.event.pull_request && 'true' }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
ruby-version:
|
|
||||||
- '3.0'
|
|
||||||
- '3.1'
|
|
||||||
- '.ruby-version'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
path: './'
|
|
||||||
name: ${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Expand archived asset artifacts
|
|
||||||
run: |
|
|
||||||
tar xvzf artifacts.tar.gz
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
with:
|
|
||||||
ruby-version: ${{ matrix.ruby-version}}
|
|
||||||
additional-system-dependencies: ffmpeg imagemagick libpam-dev
|
|
||||||
|
|
||||||
- name: Load database schema
|
|
||||||
run: './bin/rails db:create db:schema:load db:seed'
|
|
||||||
|
|
||||||
- run: bin/rspec
|
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
|
||||||
if: matrix.ruby-version == '.ruby-version'
|
|
||||||
uses: codecov/codecov-action@v3
|
|
||||||
with:
|
|
||||||
files: coverage/lcov/mastodon.lcov
|
|
||||||
|
|
||||||
test-e2e:
|
|
||||||
name: End to End testing
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:14-alpine
|
|
||||||
env:
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
options: >-
|
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:7-alpine
|
|
||||||
options: >-
|
|
||||||
--health-cmd "redis-cli ping"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
|
|
||||||
env:
|
|
||||||
DB_HOST: localhost
|
|
||||||
DB_USER: postgres
|
|
||||||
DB_PASS: postgres
|
|
||||||
DISABLE_SIMPLECOV: true
|
|
||||||
RAILS_ENV: test
|
|
||||||
BUNDLE_WITH: test
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
ruby-version:
|
|
||||||
- '3.0'
|
|
||||||
- '3.1'
|
|
||||||
- '.ruby-version'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
path: './public'
|
|
||||||
name: ${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
with:
|
|
||||||
ruby-version: ${{ matrix.ruby-version}}
|
|
||||||
additional-system-dependencies: ffmpeg imagemagick
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: Load database schema
|
|
||||||
run: './bin/rails db:create db:schema:load db:seed'
|
|
||||||
|
|
||||||
- run: bundle exec rake spec:system
|
|
||||||
|
|
||||||
- name: Archive logs
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: e2e-logs-${{ matrix.ruby-version }}
|
|
||||||
path: log/
|
|
||||||
|
|
||||||
- name: Archive test screenshots
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: e2e-screenshots
|
|
||||||
path: tmp/screenshots/
|
|
||||||
|
|
||||||
test-search:
|
|
||||||
name: Elastic Search integration testing
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:14-alpine
|
|
||||||
env:
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
options: >-
|
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:7-alpine
|
|
||||||
options: >-
|
|
||||||
--health-cmd "redis-cli ping"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
ports:
|
|
||||||
- 6379:6379
|
|
||||||
|
|
||||||
search:
|
|
||||||
image: ${{ matrix.search-image }}
|
|
||||||
env:
|
|
||||||
discovery.type: single-node
|
|
||||||
xpack.security.enabled: false
|
|
||||||
options: >-
|
|
||||||
--health-cmd "curl http://localhost:9200/_cluster/health"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 10
|
|
||||||
ports:
|
|
||||||
- 9200:9200
|
|
||||||
|
|
||||||
env:
|
|
||||||
DB_HOST: localhost
|
|
||||||
DB_USER: postgres
|
|
||||||
DB_PASS: postgres
|
|
||||||
DISABLE_SIMPLECOV: true
|
|
||||||
RAILS_ENV: test
|
|
||||||
BUNDLE_WITH: test
|
|
||||||
ES_ENABLED: true
|
|
||||||
ES_HOST: localhost
|
|
||||||
ES_PORT: 9200
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
ruby-version:
|
|
||||||
- '3.0'
|
|
||||||
- '3.1'
|
|
||||||
- '.ruby-version'
|
|
||||||
search-image:
|
|
||||||
- docker.elastic.co/elasticsearch/elasticsearch:7.17.13
|
|
||||||
include:
|
|
||||||
- ruby-version: '.ruby-version'
|
|
||||||
search-image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
path: './public'
|
|
||||||
name: ${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Ruby environment
|
|
||||||
uses: ./.github/actions/setup-ruby
|
|
||||||
with:
|
|
||||||
ruby-version: ${{ matrix.ruby-version}}
|
|
||||||
additional-system-dependencies: ffmpeg imagemagick
|
|
||||||
|
|
||||||
- name: Set up Javascript environment
|
|
||||||
uses: ./.github/actions/setup-javascript
|
|
||||||
|
|
||||||
- name: Load database schema
|
|
||||||
run: './bin/rails db:create db:schema:load db:seed'
|
|
||||||
|
|
||||||
- run: bin/rspec --tag search
|
|
||||||
|
|
||||||
- name: Archive logs
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: test-search-logs-${{ matrix.ruby-version }}
|
|
||||||
path: log/
|
|
||||||
|
|
||||||
- name: Archive test screenshots
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: test-search-screenshots
|
|
||||||
path: tmp/screenshots/
|
|
||||||
39
.gitignore
vendored
39
.gitignore
vendored
@@ -13,33 +13,33 @@
|
|||||||
/db/*.sqlite3-journal
|
/db/*.sqlite3-journal
|
||||||
|
|
||||||
# Ignore all logfiles and tempfiles.
|
# Ignore all logfiles and tempfiles.
|
||||||
.eslintcache
|
|
||||||
/log/*
|
/log/*
|
||||||
!/log/.keep
|
!/log/.keep
|
||||||
/tmp
|
/tmp
|
||||||
/coverage
|
coverage
|
||||||
/public/system
|
public/system
|
||||||
/public/assets
|
public/assets
|
||||||
/public/packs
|
public/packs
|
||||||
/public/packs-test
|
public/packs-test
|
||||||
.env
|
.env
|
||||||
.env.production
|
.env.production
|
||||||
.env.development
|
node_modules/
|
||||||
/node_modules/
|
build/
|
||||||
/build/
|
|
||||||
|
|
||||||
# Ignore Vagrant files
|
# Ignore Vagrant files
|
||||||
.vagrant/
|
.vagrant/
|
||||||
|
|
||||||
|
# Ignore Capistrano customizations
|
||||||
|
config/deploy/*
|
||||||
|
|
||||||
# Ignore IDE files
|
# Ignore IDE files
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# Ignore postgres + redis + elasticsearch volume optionally created by docker-compose
|
# Ignore postgres + redis + elasticsearch volume optionally created by docker-compose
|
||||||
/postgres
|
postgres
|
||||||
/postgres14
|
redis
|
||||||
/redis
|
elasticsearch
|
||||||
/elasticsearch
|
|
||||||
|
|
||||||
# Ignore Apple files
|
# Ignore Apple files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@@ -55,17 +55,6 @@ npm-debug.log
|
|||||||
yarn-error.log
|
yarn-error.log
|
||||||
yarn-debug.log
|
yarn-debug.log
|
||||||
|
|
||||||
# From https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
|
||||||
.pnp.*
|
|
||||||
.yarn/*
|
|
||||||
!.yarn/patches
|
|
||||||
!.yarn/plugins
|
|
||||||
!.yarn/releases
|
|
||||||
!.yarn/sdks
|
|
||||||
!.yarn/versions
|
|
||||||
|
|
||||||
# Ignore vagrant log files
|
|
||||||
*-cloudimg-console.log
|
|
||||||
|
|
||||||
# Ignore Docker option files
|
# Ignore Docker option files
|
||||||
docker-compose.override.yml
|
docker-compose.override.yml
|
||||||
|
|
||||||
|
|||||||
106
.haml-lint.yml
106
.haml-lint.yml
@@ -1,16 +1,108 @@
|
|||||||
inherits_from: .haml-lint_todo.yml
|
# Whether to ignore frontmatter at the beginning of HAML documents for
|
||||||
|
# frameworks such as Jekyll/Middleman
|
||||||
|
skip_frontmatter: false
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
- 'vendor/**/*'
|
- 'vendor/**/*'
|
||||||
- lib/templates/haml/scaffold/_form.html.haml
|
- 'spec/**/*'
|
||||||
|
- 'lib/templates/**/*'
|
||||||
require:
|
- 'app/views/kaminari/**/*'
|
||||||
- ./lib/linter/haml_middle_dot.rb
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
AltText:
|
AltText:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
ClassAttributeWithStaticValue:
|
||||||
enabled: true
|
enabled: true
|
||||||
MiddleDot:
|
|
||||||
|
ClassesBeforeIds:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
ConsecutiveComments:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ConsecutiveSilentScripts:
|
||||||
|
enabled: true
|
||||||
|
max_consecutive: 2
|
||||||
|
|
||||||
|
EmptyObjectReference:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
EmptyScript:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
FinalNewline:
|
||||||
|
enabled: true
|
||||||
|
present: true
|
||||||
|
|
||||||
|
HtmlAttributes:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ImplicitDiv:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
LeadingCommentSpace:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
LineLength:
|
LineLength:
|
||||||
max: 320
|
enabled: false
|
||||||
|
max: 80
|
||||||
|
|
||||||
|
MultilinePipe:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
MultilineScript:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ObjectReferenceAttributes:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
RuboCop:
|
||||||
|
enabled: true
|
||||||
|
# These cops are incredibly noisy when it comes to HAML templates, so we
|
||||||
|
# ignore them.
|
||||||
|
ignored_cops:
|
||||||
|
- Lint/BlockAlignment
|
||||||
|
- Lint/EndAlignment
|
||||||
|
- Lint/Void
|
||||||
|
- Metrics/BlockLength
|
||||||
|
- Metrics/LineLength
|
||||||
|
- Style/AlignParameters
|
||||||
|
- Style/BlockNesting
|
||||||
|
- Style/ElseAlignment
|
||||||
|
- Style/EndOfLine
|
||||||
|
- Style/FileName
|
||||||
|
- Style/FinalNewline
|
||||||
|
- Style/FrozenStringLiteralComment
|
||||||
|
- Style/IfUnlessModifier
|
||||||
|
- Style/IndentationWidth
|
||||||
|
- Style/Next
|
||||||
|
- Style/TrailingBlankLines
|
||||||
|
- Style/TrailingWhitespace
|
||||||
|
- Style/WhileUntilModifier
|
||||||
|
|
||||||
|
RubyComments:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
SpaceBeforeScript:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
SpaceInsideHashAttributes:
|
||||||
|
enabled: true
|
||||||
|
style: space
|
||||||
|
|
||||||
|
Indentation:
|
||||||
|
enabled: true
|
||||||
|
character: space # or tab
|
||||||
|
|
||||||
|
TagName:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
TrailingWhitespace:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
UnnecessaryInterpolation:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
UnnecessaryStringOutput:
|
||||||
|
enabled: true
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
# This configuration was generated by
|
|
||||||
# `haml-lint --auto-gen-config`
|
|
||||||
# on 2023-10-26 09:32:34 -0400 using Haml-Lint version 0.51.0.
|
|
||||||
# The point is for the user to remove these configuration records
|
|
||||||
# one by one as the lints are removed from the code base.
|
|
||||||
# Note that changes in the inspected code, or installation of new
|
|
||||||
# versions of Haml-Lint, may require this file to be generated again.
|
|
||||||
|
|
||||||
linters:
|
|
||||||
# Offense count: 16
|
|
||||||
LineLength:
|
|
||||||
exclude:
|
|
||||||
- 'app/views/admin/account_actions/new.html.haml'
|
|
||||||
- 'app/views/admin/accounts/index.html.haml'
|
|
||||||
- 'app/views/admin/ip_blocks/new.html.haml'
|
|
||||||
- 'app/views/admin/roles/_form.html.haml'
|
|
||||||
- 'app/views/admin/settings/discovery/show.html.haml'
|
|
||||||
- 'app/views/auth/registrations/edit.html.haml'
|
|
||||||
- 'app/views/auth/registrations/new.html.haml'
|
|
||||||
- 'app/views/filters/_filter_fields.html.haml'
|
|
||||||
- 'app/views/media/player.html.haml'
|
|
||||||
- 'app/views/settings/applications/_fields.html.haml'
|
|
||||||
- 'app/views/settings/imports/index.html.haml'
|
|
||||||
- 'app/views/settings/preferences/appearance/show.html.haml'
|
|
||||||
- 'app/views/settings/preferences/notifications/show.html.haml'
|
|
||||||
- 'app/views/settings/preferences/other/show.html.haml'
|
|
||||||
|
|
||||||
# Offense count: 9
|
|
||||||
RuboCop:
|
|
||||||
exclude:
|
|
||||||
- 'app/views/admin/accounts/_buttons.html.haml'
|
|
||||||
- 'app/views/admin/accounts/_local_account.html.haml'
|
|
||||||
- 'app/views/admin/roles/_form.html.haml'
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
|
||||||
|
|
||||||
yarn lint-staged
|
|
||||||
9
.postcssrc.yml
Normal file
9
.postcssrc.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
plugins:
|
||||||
|
postcss-smart-import: {}
|
||||||
|
precss: {}
|
||||||
|
autoprefixer:
|
||||||
|
browsers:
|
||||||
|
- last 2 versions
|
||||||
|
- IE >= 11
|
||||||
|
- iOS >= 9
|
||||||
|
postcss-object-fit-images: {}
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
|
||||||
#
|
|
||||||
# If you find yourself ignoring temporary files generated by your text editor
|
|
||||||
# or operating system, you probably want to add a global ignore instead:
|
|
||||||
# git config --global core.excludesfile '~/.gitignore_global'
|
|
||||||
|
|
||||||
# Ignore bundler config and downloaded libraries.
|
|
||||||
/.bundle
|
|
||||||
/vendor/bundle
|
|
||||||
|
|
||||||
# Ignore the default SQLite database.
|
|
||||||
/db/*.sqlite3
|
|
||||||
/db/*.sqlite3-journal
|
|
||||||
|
|
||||||
# Ignore all logfiles and tempfiles.
|
|
||||||
.eslintcache
|
|
||||||
/log/*
|
|
||||||
!/log/.keep
|
|
||||||
/tmp
|
|
||||||
/coverage
|
|
||||||
/public/system
|
|
||||||
/public/assets
|
|
||||||
/public/packs
|
|
||||||
/public/packs-test
|
|
||||||
.env
|
|
||||||
.env.production
|
|
||||||
.env.development
|
|
||||||
/node_modules/
|
|
||||||
/build/
|
|
||||||
|
|
||||||
# Ignore Vagrant files
|
|
||||||
.vagrant/
|
|
||||||
|
|
||||||
# Ignore IDE files
|
|
||||||
.vscode/
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
# Ignore postgres + redis + elasticsearch volume optionally created by docker-compose
|
|
||||||
/postgres
|
|
||||||
/postgres14
|
|
||||||
/redis
|
|
||||||
/elasticsearch
|
|
||||||
|
|
||||||
# Ignore Apple files
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Ignore vim files
|
|
||||||
*~
|
|
||||||
*.swp
|
|
||||||
|
|
||||||
# Ignore log files
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Ignore Docker option files
|
|
||||||
docker-compose.override.yml
|
|
||||||
|
|
||||||
# Ignore emoji map file
|
|
||||||
/app/javascript/mastodon/features/emoji/emoji_map.json
|
|
||||||
|
|
||||||
# Ignore locale files
|
|
||||||
/app/javascript/mastodon/locales/*.json
|
|
||||||
/config/locales
|
|
||||||
|
|
||||||
# Ignore vendored CSS reset
|
|
||||||
app/javascript/styles/mastodon/reset.scss
|
|
||||||
|
|
||||||
# Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631
|
|
||||||
*.js
|
|
||||||
*.jsx
|
|
||||||
|
|
||||||
# Ignore HTML till cleaned and included in CI
|
|
||||||
*.html
|
|
||||||
|
|
||||||
# Ignore the generated AUTHORS.md
|
|
||||||
AUTHORS.md
|
|
||||||
|
|
||||||
# Ignore glitch-soc emoji map file
|
|
||||||
/app/javascript/flavours/glitch/features/emoji/emoji_map.json
|
|
||||||
|
|
||||||
# Ignore glitch-soc locale files
|
|
||||||
/app/javascript/flavours/glitch/locales
|
|
||||||
/config/locales-glitch
|
|
||||||
|
|
||||||
# Ignore glitch-soc vendored CSS reset
|
|
||||||
app/javascript/flavours/glitch/styles/reset.scss
|
|
||||||
|
|
||||||
# Ignore win95 theme
|
|
||||||
app/javascript/styles/win95.scss
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
singleQuote: true,
|
|
||||||
jsxSingleQuote: true
|
|
||||||
}
|
|
||||||
2
.profile
2
.profile
@@ -1 +1 @@
|
|||||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app/.apt/lib/x86_64-linux-gnu:/app/.apt/usr/lib/x86_64-linux-gnu/mesa:/app/.apt/usr/lib/x86_64-linux-gnu/pulseaudio:/app/.apt/usr/lib/x86_64-linux-gnu/openblas-pthread
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app/.apt/lib/x86_64-linux-gnu:/app/.apt/usr/lib/x86_64-linux-gnu/mesa:/app/.apt/usr/lib/x86_64-linux-gnu/pulseaudio
|
||||||
|
|||||||
234
.rubocop.yml
234
.rubocop.yml
@@ -1,202 +1,114 @@
|
|||||||
# Can be removed once all rules are addressed or moved to this file as documented overrides
|
|
||||||
inherit_from: .rubocop_todo.yml
|
|
||||||
|
|
||||||
# Used for merging with exclude lists with .rubocop_todo.yml
|
|
||||||
inherit_mode:
|
|
||||||
merge:
|
|
||||||
- Exclude
|
|
||||||
|
|
||||||
require:
|
|
||||||
- rubocop-rails
|
|
||||||
- rubocop-rspec
|
|
||||||
- rubocop-performance
|
|
||||||
- rubocop-capybara
|
|
||||||
- ./lib/linter/rubocop_middle_dot
|
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
TargetRubyVersion: 3.0 # Set to minimum supported version of CI
|
TargetRubyVersion: 2.3
|
||||||
DisplayCopNames: true
|
|
||||||
DisplayStyleGuide: true
|
|
||||||
ExtraDetails: true
|
|
||||||
UseCache: true
|
|
||||||
CacheRootDirectory: tmp
|
|
||||||
NewCops: enable # Opt-in to newly added rules
|
|
||||||
Exclude:
|
Exclude:
|
||||||
- db/schema.rb
|
- 'spec/**/*'
|
||||||
- 'bin/*'
|
- 'db/**/*'
|
||||||
- 'node_modules/**/*'
|
- 'app/views/**/*'
|
||||||
- 'Vagrantfile'
|
- 'config/**/*'
|
||||||
- 'vendor/**/*'
|
- 'bin/*'
|
||||||
- 'config/initializers/json_ld*' # Generated files
|
- 'Rakefile'
|
||||||
- 'lib/mastodon/migration_helpers.rb' # Vendored from GitLab
|
- 'node_modules/**/*'
|
||||||
- 'lib/templates/**/*'
|
- 'Vagrantfile'
|
||||||
|
- 'vendor/**/*'
|
||||||
|
- 'lib/json_ld/*'
|
||||||
|
|
||||||
# Reason: Prefer Hashes without extreme indentation
|
Bundler/OrderedGems:
|
||||||
# https://docs.rubocop.org/rubocop/cops_layout.html#layoutfirsthashelementindentation
|
|
||||||
Layout/FirstHashElementIndentation:
|
|
||||||
EnforcedStyle: consistent
|
|
||||||
|
|
||||||
# Reason: Currently disabled in .rubocop_todo.yml
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_layout.html#layoutlinelength
|
|
||||||
Layout/LineLength:
|
|
||||||
Max: 320 # Default of 120 causes a duplicate entry in generated todo file
|
|
||||||
|
|
||||||
# Reason:
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessaccessmodifier
|
|
||||||
Lint/UselessAccessModifier:
|
|
||||||
ContextCreatingMethods:
|
|
||||||
- class_methods
|
|
||||||
|
|
||||||
## Disable most Metrics/*Length cops
|
|
||||||
# Reason: those are often triggered and force significant refactors when this happend
|
|
||||||
# but the team feel they are not really improving the code quality.
|
|
||||||
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsblocklength
|
|
||||||
Metrics/BlockLength:
|
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsclasslength
|
Layout/AccessModifierIndentation:
|
||||||
Metrics/ClassLength:
|
EnforcedStyle: indent
|
||||||
|
|
||||||
|
Layout/EmptyLineAfterMagicComment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmethodlength
|
Layout/SpaceInsideHashLiteralBraces:
|
||||||
Metrics/MethodLength:
|
EnforcedStyle: space
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmodulelength
|
|
||||||
Metrics/ModuleLength:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
## End Disable Metrics/*Length cops
|
|
||||||
|
|
||||||
# Reason: Currently disabled in .rubocop_todo.yml
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsabcsize
|
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
Exclude:
|
Max: 100
|
||||||
- 'lib/mastodon/cli/*.rb'
|
|
||||||
- db/*migrate/**/*
|
Metrics/BlockLength:
|
||||||
|
Max: 35
|
||||||
|
Exclude:
|
||||||
|
- 'lib/tasks/**/*'
|
||||||
|
|
||||||
|
Metrics/BlockNesting:
|
||||||
|
Max: 3
|
||||||
|
|
||||||
|
Metrics/ClassLength:
|
||||||
|
CountComments: false
|
||||||
|
Max: 300
|
||||||
|
|
||||||
# Reason: Currently disabled in .rubocop_todo.yml
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricscyclomaticcomplexity
|
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
Exclude:
|
Max: 25
|
||||||
- lib/mastodon/cli/*.rb
|
|
||||||
- db/*migrate/**/*
|
Metrics/LineLength:
|
||||||
|
AllowURI: true
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Metrics/MethodLength:
|
||||||
|
CountComments: false
|
||||||
|
Max: 55
|
||||||
|
|
||||||
|
Metrics/ModuleLength:
|
||||||
|
CountComments: false
|
||||||
|
Max: 200
|
||||||
|
|
||||||
# Reason:
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsparameterlists
|
|
||||||
Metrics/ParameterLists:
|
Metrics/ParameterLists:
|
||||||
CountKeywordArgs: false
|
Max: 5
|
||||||
|
CountKeywordArgs: true
|
||||||
|
|
||||||
# Reason: Prevailing style is argument file paths
|
Metrics/PerceivedComplexity:
|
||||||
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsfilepath
|
Max: 20
|
||||||
Rails/FilePath:
|
|
||||||
EnforcedStyle: arguments
|
|
||||||
|
|
||||||
# Reason: Prevailing style uses numeric status codes, matches RSpec/Rails/HttpStatus
|
Rails:
|
||||||
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railshttpstatus
|
Enabled: true
|
||||||
Rails/HttpStatus:
|
|
||||||
EnforcedStyle: numeric
|
|
||||||
|
|
||||||
# Reason: Allowed in `tootctl` CLI code and in boot ENV checker
|
Rails/HasAndBelongsToMany:
|
||||||
# https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsexit
|
Enabled: false
|
||||||
Rails/Exit:
|
|
||||||
Exclude:
|
|
||||||
- 'config/boot.rb'
|
|
||||||
- 'lib/mastodon/cli/*.rb'
|
|
||||||
|
|
||||||
# Reason: Some single letter camel case files shouldn't be split
|
Rails/SkipsModelValidations:
|
||||||
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfilepath
|
Enabled: false
|
||||||
RSpec/FilePath:
|
|
||||||
CustomTransform:
|
|
||||||
ActivityPub: activitypub
|
|
||||||
DeepL: deepl
|
|
||||||
FetchOEmbedService: fetch_oembed_service
|
|
||||||
OEmbedController: oembed_controller
|
|
||||||
OStatus: ostatus
|
|
||||||
|
|
||||||
# Reason:
|
|
||||||
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject
|
|
||||||
RSpec/NamedSubject:
|
|
||||||
EnforcedStyle: named_only
|
|
||||||
|
|
||||||
# Reason: Prevailing style choice
|
|
||||||
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnottonot
|
|
||||||
RSpec/NotToNot:
|
|
||||||
EnforcedStyle: to_not
|
|
||||||
|
|
||||||
# Reason: Prevailing style uses numeric status codes, matches Rails/HttpStatus
|
|
||||||
# https://docs.rubocop.org/rubocop-rspec/cops_rspec_rails.html#rspecrailshttpstatus
|
|
||||||
RSpec/Rails/HttpStatus:
|
|
||||||
EnforcedStyle: numeric
|
|
||||||
|
|
||||||
# Reason: Match overrides from Rspec/FilePath rule above
|
|
||||||
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecspecfilepathformat
|
|
||||||
RSpec/SpecFilePathFormat:
|
|
||||||
CustomTransform:
|
|
||||||
ActivityPub: activitypub
|
|
||||||
DeepL: deepl
|
|
||||||
FetchOEmbedService: fetch_oembed_service
|
|
||||||
OEmbedController: oembed_controller
|
|
||||||
OStatus: ostatus
|
|
||||||
|
|
||||||
# Reason:
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#styleclassandmodulechildren
|
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Reason: Classes mostly self-document with their names
|
Style/CollectionMethods:
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#styledocumentation
|
Enabled: true
|
||||||
|
PreferredMethods:
|
||||||
|
find_all: 'select'
|
||||||
|
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Reason: Enforce modern Ruby style
|
Style/DoubleNegation:
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#stylehashsyntax
|
Enabled: true
|
||||||
Style/HashSyntax:
|
|
||||||
EnforcedStyle: ruby19_no_mixed_keys
|
|
||||||
|
|
||||||
# Reason:
|
Style/FrozenStringLiteralComment:
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#stylenumericliterals
|
Enabled: true
|
||||||
Style/NumericLiterals:
|
|
||||||
AllowedPatterns:
|
Style/GuardClause:
|
||||||
- \d{4}_\d{2}_\d{2}_\d{6} # For DB migration date version number readability
|
Enabled: false
|
||||||
|
|
||||||
|
Style/Lambda:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# Reason:
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#stylepercentliteraldelimiters
|
|
||||||
Style/PercentLiteralDelimiters:
|
Style/PercentLiteralDelimiters:
|
||||||
PreferredDelimiters:
|
PreferredDelimiters:
|
||||||
'%i': '()'
|
'%i': '()'
|
||||||
'%w': '()'
|
'%w': '()'
|
||||||
|
|
||||||
# Reason: Prefer less indentation in conditional assignments
|
Style/PerlBackrefs:
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#styleredundantbegin
|
AutoCorrect: false
|
||||||
Style/RedundantBegin:
|
|
||||||
|
Style/RegexpLiteral:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Reason: Overridden to reduce implicit StandardError rescues
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#stylerescuestandarderror
|
|
||||||
Style/RescueStandardError:
|
|
||||||
EnforcedStyle: implicit
|
|
||||||
|
|
||||||
# Reason: Simplify some spec layouts
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#stylesemicolon
|
|
||||||
Style/Semicolon:
|
|
||||||
AllowAsExpressionSeparator: true
|
|
||||||
|
|
||||||
# Reason: Originally disabled for CodeClimate, and no config consensus has been found
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#stylesymbolarray
|
|
||||||
Style/SymbolArray:
|
Style/SymbolArray:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Reason:
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#styletrailingcommainarrayliteral
|
|
||||||
Style/TrailingCommaInArrayLiteral:
|
Style/TrailingCommaInArrayLiteral:
|
||||||
EnforcedStyleForMultiline: 'comma'
|
EnforcedStyleForMultiline: 'comma'
|
||||||
|
|
||||||
# Reason:
|
|
||||||
# https://docs.rubocop.org/rubocop/cops_style.html#styletrailingcommainhashliteral
|
|
||||||
Style/TrailingCommaInHashLiteral:
|
Style/TrailingCommaInHashLiteral:
|
||||||
EnforcedStyleForMultiline: 'comma'
|
EnforcedStyleForMultiline: 'comma'
|
||||||
|
|
||||||
Style/MiddleDot:
|
|
||||||
Enabled: true
|
|
||||||
|
|||||||
@@ -1,563 +0,0 @@
|
|||||||
# This configuration was generated by
|
|
||||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
|
|
||||||
# using RuboCop version 1.57.2.
|
|
||||||
# The point is for the user to remove these configuration records
|
|
||||||
# one by one as the offenses are removed from the code base.
|
|
||||||
# Note that changes in the inspected code, or installation of new
|
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
|
||||||
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
|
||||||
Bundler/OrderedGems:
|
|
||||||
Exclude:
|
|
||||||
- 'Gemfile'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
||||||
# URISchemes: http, https
|
|
||||||
Layout/LineLength:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/account.rb'
|
|
||||||
|
|
||||||
Lint/NonLocalExitFromIterator:
|
|
||||||
Exclude:
|
|
||||||
- 'app/helpers/jsonld_helper.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
||||||
Metrics/AbcSize:
|
|
||||||
Max: 144
|
|
||||||
Exclude:
|
|
||||||
- 'app/serializers/initial_state_serializer.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: CountBlocks, Max.
|
|
||||||
Metrics/BlockNesting:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/tasks/mastodon.rake'
|
|
||||||
|
|
||||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
||||||
Metrics/CyclomaticComplexity:
|
|
||||||
Max: 25
|
|
||||||
|
|
||||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
||||||
Metrics/PerceivedComplexity:
|
|
||||||
Max: 27
|
|
||||||
|
|
||||||
# Configuration parameters: CountAsOne.
|
|
||||||
RSpec/ExampleLength:
|
|
||||||
Max: 22
|
|
||||||
|
|
||||||
RSpec/LetSetup:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/controllers/api/v1/accounts/statuses_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v1/filters_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v2/filters/keywords_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v2/filters/statuses_controller_spec.rb'
|
|
||||||
- 'spec/controllers/auth/confirmations_controller_spec.rb'
|
|
||||||
- 'spec/controllers/auth/passwords_controller_spec.rb'
|
|
||||||
- 'spec/controllers/auth/sessions_controller_spec.rb'
|
|
||||||
- 'spec/controllers/follower_accounts_controller_spec.rb'
|
|
||||||
- 'spec/controllers/following_accounts_controller_spec.rb'
|
|
||||||
- 'spec/controllers/oauth/authorized_applications_controller_spec.rb'
|
|
||||||
- 'spec/controllers/oauth/tokens_controller_spec.rb'
|
|
||||||
- 'spec/controllers/settings/imports_controller_spec.rb'
|
|
||||||
- 'spec/lib/activitypub/activity/delete_spec.rb'
|
|
||||||
- 'spec/lib/vacuum/applications_vacuum_spec.rb'
|
|
||||||
- 'spec/lib/vacuum/preview_cards_vacuum_spec.rb'
|
|
||||||
- 'spec/models/account_spec.rb'
|
|
||||||
- 'spec/models/account_statuses_cleanup_policy_spec.rb'
|
|
||||||
- 'spec/models/canonical_email_block_spec.rb'
|
|
||||||
- 'spec/models/status_spec.rb'
|
|
||||||
- 'spec/models/user_spec.rb'
|
|
||||||
- 'spec/services/account_statuses_cleanup_service_spec.rb'
|
|
||||||
- 'spec/services/activitypub/fetch_featured_collection_service_spec.rb'
|
|
||||||
- 'spec/services/activitypub/fetch_remote_status_service_spec.rb'
|
|
||||||
- 'spec/services/activitypub/process_account_service_spec.rb'
|
|
||||||
- 'spec/services/activitypub/process_collection_service_spec.rb'
|
|
||||||
- 'spec/services/batched_remove_status_service_spec.rb'
|
|
||||||
- 'spec/services/block_domain_service_spec.rb'
|
|
||||||
- 'spec/services/bulk_import_service_spec.rb'
|
|
||||||
- 'spec/services/delete_account_service_spec.rb'
|
|
||||||
- 'spec/services/import_service_spec.rb'
|
|
||||||
- 'spec/services/notify_service_spec.rb'
|
|
||||||
- 'spec/services/remove_status_service_spec.rb'
|
|
||||||
- 'spec/services/report_service_spec.rb'
|
|
||||||
- 'spec/services/resolve_account_service_spec.rb'
|
|
||||||
- 'spec/services/suspend_account_service_spec.rb'
|
|
||||||
- 'spec/services/unallow_domain_service_spec.rb'
|
|
||||||
- 'spec/services/unsuspend_account_service_spec.rb'
|
|
||||||
- 'spec/workers/scheduler/user_cleanup_scheduler_spec.rb'
|
|
||||||
|
|
||||||
RSpec/MultipleExpectations:
|
|
||||||
Max: 8
|
|
||||||
|
|
||||||
# Configuration parameters: AllowSubject.
|
|
||||||
RSpec/MultipleMemoizedHelpers:
|
|
||||||
Max: 21
|
|
||||||
|
|
||||||
# Configuration parameters: AllowedGroups.
|
|
||||||
RSpec/NestedGroups:
|
|
||||||
Max: 6
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
Rails/ApplicationController:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/health_controller.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: Include.
|
|
||||||
# Include: app/models/**/*.rb
|
|
||||||
Rails/HasAndBelongsToMany:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/concerns/account_associations.rb'
|
|
||||||
- 'app/models/preview_card.rb'
|
|
||||||
- 'app/models/status.rb'
|
|
||||||
- 'app/models/tag.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: Include.
|
|
||||||
# Include: app/models/**/*.rb
|
|
||||||
Rails/HasManyOrHasOneDependent:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/concerns/account_counters.rb'
|
|
||||||
- 'app/models/conversation.rb'
|
|
||||||
- 'app/models/custom_emoji.rb'
|
|
||||||
- 'app/models/custom_emoji_category.rb'
|
|
||||||
- 'app/models/domain_block.rb'
|
|
||||||
- 'app/models/invite.rb'
|
|
||||||
- 'app/models/status.rb'
|
|
||||||
- 'app/models/user.rb'
|
|
||||||
- 'app/models/web/push_subscription.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: Include.
|
|
||||||
# Include: app/controllers/**/*.rb, app/mailers/**/*.rb
|
|
||||||
Rails/LexicallyScopedActionFilter:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/auth/passwords_controller.rb'
|
|
||||||
- 'app/controllers/auth/registrations_controller.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
Rails/NegateInclude:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/concerns/signature_verification.rb'
|
|
||||||
- 'app/helpers/jsonld_helper.rb'
|
|
||||||
- 'app/lib/activitypub/activity/create.rb'
|
|
||||||
- 'app/lib/activitypub/activity/move.rb'
|
|
||||||
- 'app/lib/feed_manager.rb'
|
|
||||||
- 'app/lib/link_details_extractor.rb'
|
|
||||||
- 'app/models/concerns/attachmentable.rb'
|
|
||||||
- 'app/models/concerns/remotable.rb'
|
|
||||||
- 'app/models/custom_filter.rb'
|
|
||||||
- 'app/services/activitypub/process_status_update_service.rb'
|
|
||||||
- 'app/services/fetch_link_card_service.rb'
|
|
||||||
- 'app/workers/web/push_notification_worker.rb'
|
|
||||||
- 'lib/paperclip/color_extractor.rb'
|
|
||||||
|
|
||||||
Rails/OutputSafety:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/simple_form.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: Include.
|
|
||||||
# Include: **/Rakefile, **/*.rake
|
|
||||||
Rails/RakeEnvironment:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/tasks/auto_annotate_models.rake'
|
|
||||||
- 'lib/tasks/db.rake'
|
|
||||||
- 'lib/tasks/emojis.rake'
|
|
||||||
- 'lib/tasks/mastodon.rake'
|
|
||||||
- 'lib/tasks/repo.rake'
|
|
||||||
- 'lib/tasks/statistics.rake'
|
|
||||||
|
|
||||||
# Configuration parameters: ForbiddenMethods, AllowedMethods.
|
|
||||||
# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
|
|
||||||
Rails/SkipsModelValidations:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/admin/invites_controller.rb'
|
|
||||||
- 'app/controllers/concerns/session_tracking_concern.rb'
|
|
||||||
- 'app/models/concerns/account_merging.rb'
|
|
||||||
- 'app/models/concerns/expireable.rb'
|
|
||||||
- 'app/models/status.rb'
|
|
||||||
- 'app/models/trends/links.rb'
|
|
||||||
- 'app/models/trends/preview_card_batch.rb'
|
|
||||||
- 'app/models/trends/preview_card_provider_batch.rb'
|
|
||||||
- 'app/models/trends/status_batch.rb'
|
|
||||||
- 'app/models/trends/statuses.rb'
|
|
||||||
- 'app/models/trends/tag_batch.rb'
|
|
||||||
- 'app/models/trends/tags.rb'
|
|
||||||
- 'app/models/user.rb'
|
|
||||||
- 'app/services/activitypub/process_status_update_service.rb'
|
|
||||||
- 'app/services/approve_appeal_service.rb'
|
|
||||||
- 'app/services/block_domain_service.rb'
|
|
||||||
- 'app/services/delete_account_service.rb'
|
|
||||||
- 'app/services/process_mentions_service.rb'
|
|
||||||
- 'app/services/unallow_domain_service.rb'
|
|
||||||
- 'app/services/unblock_domain_service.rb'
|
|
||||||
- 'app/services/update_status_service.rb'
|
|
||||||
- 'app/workers/activitypub/post_upgrade_worker.rb'
|
|
||||||
- 'app/workers/move_worker.rb'
|
|
||||||
- 'app/workers/scheduler/ip_cleanup_scheduler.rb'
|
|
||||||
- 'app/workers/scheduler/scheduled_statuses_scheduler.rb'
|
|
||||||
- 'db/migrate/20161203164520_add_from_account_id_to_notifications.rb'
|
|
||||||
- 'db/migrate/20170105224407_add_shortcode_to_media_attachments.rb'
|
|
||||||
- 'db/migrate/20170209184350_add_reply_to_statuses.rb'
|
|
||||||
- 'db/migrate/20170304202101_add_type_to_media_attachments.rb'
|
|
||||||
- 'db/migrate/20180528141303_fix_accounts_unique_index.rb'
|
|
||||||
- 'db/migrate/20180609104432_migrate_web_push_subscriptions2.rb'
|
|
||||||
- 'db/migrate/20181207011115_downcase_custom_emoji_domains.rb'
|
|
||||||
- 'db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb'
|
|
||||||
- 'db/migrate/20191007013357_update_pt_locales.rb'
|
|
||||||
- 'db/migrate/20220316233212_update_kurdish_locales.rb'
|
|
||||||
- 'db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb'
|
|
||||||
- 'db/post_migrate/20200917193528_migrate_notifications_type.rb'
|
|
||||||
- 'db/post_migrate/20201017234926_fill_account_suspension_origin.rb'
|
|
||||||
- 'db/post_migrate/20220617202502_migrate_roles.rb'
|
|
||||||
- 'db/post_migrate/20221101190723_backfill_admin_action_logs.rb'
|
|
||||||
- 'db/post_migrate/20221206114142_backfill_admin_action_logs_again.rb'
|
|
||||||
- 'lib/mastodon/cli/accounts.rb'
|
|
||||||
- 'lib/mastodon/cli/maintenance.rb'
|
|
||||||
- 'spec/lib/activitypub/activity/follow_spec.rb'
|
|
||||||
- 'spec/services/follow_service_spec.rb'
|
|
||||||
- 'spec/services/update_account_service_spec.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: Include.
|
|
||||||
# Include: app/models/**/*.rb
|
|
||||||
Rails/UniqueValidationWithoutIndex:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/account_alias.rb'
|
|
||||||
- 'app/models/custom_filter_status.rb'
|
|
||||||
- 'app/models/identity.rb'
|
|
||||||
- 'app/models/webauthn_credential.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: Include.
|
|
||||||
# Include: app/models/**/*.rb
|
|
||||||
Rails/UnusedIgnoredColumns:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/account.rb'
|
|
||||||
- 'app/models/account_stat.rb'
|
|
||||||
- 'app/models/admin/action_log.rb'
|
|
||||||
- 'app/models/custom_filter.rb'
|
|
||||||
- 'app/models/email_domain_block.rb'
|
|
||||||
- 'app/models/report.rb'
|
|
||||||
- 'app/models/status_edit.rb'
|
|
||||||
- 'app/models/user.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: exists, where
|
|
||||||
Rails/WhereExists:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/activitypub/inboxes_controller.rb'
|
|
||||||
- 'app/controllers/admin/email_domain_blocks_controller.rb'
|
|
||||||
- 'app/controllers/auth/registrations_controller.rb'
|
|
||||||
- 'app/lib/activitypub/activity/create.rb'
|
|
||||||
- 'app/lib/delivery_failure_tracker.rb'
|
|
||||||
- 'app/lib/feed_manager.rb'
|
|
||||||
- 'app/lib/status_cache_hydrator.rb'
|
|
||||||
- 'app/lib/suspicious_sign_in_detector.rb'
|
|
||||||
- 'app/models/concerns/account_interactions.rb'
|
|
||||||
- 'app/models/featured_tag.rb'
|
|
||||||
- 'app/models/poll.rb'
|
|
||||||
- 'app/models/session_activation.rb'
|
|
||||||
- 'app/models/status.rb'
|
|
||||||
- 'app/models/user.rb'
|
|
||||||
- 'app/policies/status_policy.rb'
|
|
||||||
- 'app/serializers/rest/announcement_serializer.rb'
|
|
||||||
- 'app/serializers/rest/tag_serializer.rb'
|
|
||||||
- 'app/services/activitypub/fetch_remote_status_service.rb'
|
|
||||||
- 'app/services/app_sign_up_service.rb'
|
|
||||||
- 'app/services/vote_service.rb'
|
|
||||||
- 'app/validators/reaction_validator.rb'
|
|
||||||
- 'app/validators/vote_validator.rb'
|
|
||||||
- 'app/workers/move_worker.rb'
|
|
||||||
- 'db/migrate/20190529143559_preserve_old_layout_for_existing_users.rb'
|
|
||||||
- 'lib/tasks/tests.rake'
|
|
||||||
- 'spec/models/account_spec.rb'
|
|
||||||
- 'spec/services/activitypub/process_collection_service_spec.rb'
|
|
||||||
- 'spec/services/purge_domain_service_spec.rb'
|
|
||||||
- 'spec/services/unallow_domain_service_spec.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: AllowOnConstant, AllowOnSelfClass.
|
|
||||||
Style/CaseEquality:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/trusted_proxies.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
||||||
# AllowedMethods: ==, equal?, eql?
|
|
||||||
Style/ClassEqualityComparison:
|
|
||||||
Exclude:
|
|
||||||
- 'app/helpers/jsonld_helper.rb'
|
|
||||||
- 'app/serializers/activitypub/outbox_serializer.rb'
|
|
||||||
|
|
||||||
Style/ClassVars:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/devise.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: AllowedVars.
|
|
||||||
Style/FetchEnvVar:
|
|
||||||
Exclude:
|
|
||||||
- 'app/lib/redis_configuration.rb'
|
|
||||||
- 'app/lib/translation_service.rb'
|
|
||||||
- 'config/environments/development.rb'
|
|
||||||
- 'config/environments/production.rb'
|
|
||||||
- 'config/initializers/2_limited_federation_mode.rb'
|
|
||||||
- 'config/initializers/3_omniauth.rb'
|
|
||||||
- 'config/initializers/blacklists.rb'
|
|
||||||
- 'config/initializers/cache_buster.rb'
|
|
||||||
- 'config/initializers/devise.rb'
|
|
||||||
- 'config/initializers/paperclip.rb'
|
|
||||||
- 'config/initializers/vapid.rb'
|
|
||||||
- 'lib/mastodon/premailer_webpack_strategy.rb'
|
|
||||||
- 'lib/mastodon/redis_config.rb'
|
|
||||||
- 'lib/tasks/repo.rake'
|
|
||||||
- 'spec/features/profile_spec.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
|
|
||||||
# SupportedStyles: annotated, template, unannotated
|
|
||||||
# AllowedMethods: redirect
|
|
||||||
Style/FormatStringToken:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/privacy_policy.rb'
|
|
||||||
- 'config/initializers/devise.rb'
|
|
||||||
- 'lib/paperclip/color_extractor.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
Style/GlobalStdStream:
|
|
||||||
Exclude:
|
|
||||||
- 'config/boot.rb'
|
|
||||||
- 'config/environments/development.rb'
|
|
||||||
- 'config/environments/production.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
|
||||||
Style/GuardClause:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/admin/confirmations_controller.rb'
|
|
||||||
- 'app/controllers/auth/confirmations_controller.rb'
|
|
||||||
- 'app/controllers/auth/passwords_controller.rb'
|
|
||||||
- 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
|
|
||||||
- 'app/lib/activitypub/activity/block.rb'
|
|
||||||
- 'app/lib/request.rb'
|
|
||||||
- 'app/lib/request_pool.rb'
|
|
||||||
- 'app/lib/webfinger.rb'
|
|
||||||
- 'app/lib/webfinger_resource.rb'
|
|
||||||
- 'app/models/concerns/account_counters.rb'
|
|
||||||
- 'app/models/concerns/ldap_authenticable.rb'
|
|
||||||
- 'app/models/tag.rb'
|
|
||||||
- 'app/models/user.rb'
|
|
||||||
- 'app/services/fan_out_on_write_service.rb'
|
|
||||||
- 'app/services/post_status_service.rb'
|
|
||||||
- 'app/services/process_hashtags_service.rb'
|
|
||||||
- 'app/workers/move_worker.rb'
|
|
||||||
- 'app/workers/redownload_avatar_worker.rb'
|
|
||||||
- 'app/workers/redownload_header_worker.rb'
|
|
||||||
- 'app/workers/redownload_media_worker.rb'
|
|
||||||
- 'app/workers/remote_account_refresh_worker.rb'
|
|
||||||
- 'config/initializers/devise.rb'
|
|
||||||
- 'db/migrate/20170901141119_truncate_preview_cards.rb'
|
|
||||||
- 'db/post_migrate/20220704024901_migrate_settings_to_user_roles.rb'
|
|
||||||
- 'lib/devise/two_factor_ldap_authenticatable.rb'
|
|
||||||
- 'lib/devise/two_factor_pam_authenticatable.rb'
|
|
||||||
- 'lib/mastodon/cli/accounts.rb'
|
|
||||||
- 'lib/mastodon/cli/maintenance.rb'
|
|
||||||
- 'lib/mastodon/cli/media.rb'
|
|
||||||
- 'lib/paperclip/attachment_extensions.rb'
|
|
||||||
- 'lib/tasks/repo.rake'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: braces, no_braces
|
|
||||||
Style/HashAsLastArrayItem:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/admin/statuses_controller.rb'
|
|
||||||
- 'app/controllers/api/v1/statuses_controller.rb'
|
|
||||||
- 'app/models/concerns/account_counters.rb'
|
|
||||||
- 'app/models/concerns/status_threading_concern.rb'
|
|
||||||
- 'app/models/status.rb'
|
|
||||||
- 'app/services/batched_remove_status_service.rb'
|
|
||||||
- 'app/services/notify_service.rb'
|
|
||||||
- 'db/migrate/20181024224956_migrate_account_conversations.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
Style/HashTransformValues:
|
|
||||||
Exclude:
|
|
||||||
- 'app/serializers/rest/web_push_subscription_serializer.rb'
|
|
||||||
- 'app/services/import_service.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
Style/IfUnlessModifier:
|
|
||||||
Exclude:
|
|
||||||
- 'config/environments/production.rb'
|
|
||||||
- 'config/initializers/devise.rb'
|
|
||||||
- 'config/initializers/ffmpeg.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: InverseMethods, InverseBlocks.
|
|
||||||
Style/InverseMethods:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/custom_filter.rb'
|
|
||||||
- 'app/services/update_account_service.rb'
|
|
||||||
- 'spec/controllers/activitypub/replies_controller_spec.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: line_count_dependent, lambda, literal
|
|
||||||
Style/Lambda:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/simple_form.rb'
|
|
||||||
- 'config/routes.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
Style/MapToHash:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/status.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: literals, strict
|
|
||||||
Style/MutableConstant:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/tag.rb'
|
|
||||||
- 'app/services/delete_account_service.rb'
|
|
||||||
- 'lib/mastodon/migration_warning.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
Style/NilLambda:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/paperclip.rb'
|
|
||||||
|
|
||||||
# Configuration parameters: AllowedMethods.
|
|
||||||
# AllowedMethods: respond_to_missing?
|
|
||||||
Style/OptionalBooleanParameter:
|
|
||||||
Exclude:
|
|
||||||
- 'app/helpers/admin/account_moderation_notes_helper.rb'
|
|
||||||
- 'app/helpers/jsonld_helper.rb'
|
|
||||||
- 'app/lib/admin/system_check/message.rb'
|
|
||||||
- 'app/lib/request.rb'
|
|
||||||
- 'app/lib/webfinger.rb'
|
|
||||||
- 'app/services/block_domain_service.rb'
|
|
||||||
- 'app/services/fetch_resource_service.rb'
|
|
||||||
- 'app/workers/domain_block_worker.rb'
|
|
||||||
- 'app/workers/unfollow_follow_worker.rb'
|
|
||||||
- 'lib/mastodon/redis_config.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: PreferredDelimiters.
|
|
||||||
Style/PercentLiteralDelimiters:
|
|
||||||
Exclude:
|
|
||||||
- 'config/deploy.rb'
|
|
||||||
- 'config/initializers/doorkeeper.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: short, verbose
|
|
||||||
Style/PreferredHashMethods:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/paperclip.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
Style/RedundantConstantBase:
|
|
||||||
Exclude:
|
|
||||||
- 'config/environments/production.rb'
|
|
||||||
- 'config/initializers/sidekiq.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: SafeForConstants.
|
|
||||||
Style/RedundantFetchBlock:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/1_hosts.rb'
|
|
||||||
- 'config/initializers/chewy.rb'
|
|
||||||
- 'config/initializers/devise.rb'
|
|
||||||
- 'config/initializers/paperclip.rb'
|
|
||||||
- 'config/puma.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: AllowMultipleReturnValues.
|
|
||||||
Style/RedundantReturn:
|
|
||||||
Exclude:
|
|
||||||
- 'app/controllers/api/v1/directories_controller.rb'
|
|
||||||
- 'app/controllers/auth/confirmations_controller.rb'
|
|
||||||
- 'app/lib/ostatus/tag_manager.rb'
|
|
||||||
- 'app/models/form/import.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
|
||||||
# AllowedMethods: present?, blank?, presence, try, try!
|
|
||||||
Style/SafeNavigation:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/concerns/account_finder_concern.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: only_raise, only_fail, semantic
|
|
||||||
Style/SignalException:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/devise/two_factor_ldap_authenticatable.rb'
|
|
||||||
- 'lib/devise/two_factor_pam_authenticatable.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
Style/SingleArgumentDig:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/webpacker/manifest_extensions.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
Style/StderrPuts:
|
|
||||||
Exclude:
|
|
||||||
- 'config/boot.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: Mode.
|
|
||||||
Style/StringConcatenation:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/paperclip.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
||||||
# SupportedStyles: single_quotes, double_quotes
|
|
||||||
Style/StringLiterals:
|
|
||||||
Exclude:
|
|
||||||
- 'config/environments/production.rb'
|
|
||||||
- 'config/initializers/backtrace_silencers.rb'
|
|
||||||
- 'config/initializers/http_client_proxy.rb'
|
|
||||||
- 'config/initializers/rack_attack.rb'
|
|
||||||
- 'config/initializers/webauthn.rb'
|
|
||||||
- 'config/routes.rb'
|
|
||||||
|
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
||||||
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
|
|
||||||
# AllowedMethods: define_method, mail, respond_to
|
|
||||||
Style/SymbolProc:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/3_omniauth.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle, AllowSafeAssignment.
|
|
||||||
# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
|
|
||||||
Style/TernaryParentheses:
|
|
||||||
Exclude:
|
|
||||||
- 'config/environments/development.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyleForMultiline.
|
|
||||||
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
|
||||||
Style/TrailingCommaInArguments:
|
|
||||||
Exclude:
|
|
||||||
- 'config/initializers/paperclip.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyleForMultiline.
|
|
||||||
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
|
||||||
Style/TrailingCommaInHashLiteral:
|
|
||||||
Exclude:
|
|
||||||
- 'config/environments/production.rb'
|
|
||||||
- 'config/environments/test.rb'
|
|
||||||
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
|
||||||
# SupportedStyles: percent, brackets
|
|
||||||
Style/WordArray:
|
|
||||||
Exclude:
|
|
||||||
- 'app/helpers/languages_helper.rb'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
mastodon
|
|
||||||
@@ -1 +1 @@
|
|||||||
3.2.2
|
2.5.1
|
||||||
|
|||||||
264
.scss-lint.yml
Normal file
264
.scss-lint.yml
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
# Linter Documentation:
|
||||||
|
# https://github.com/brigade/scss-lint/blob/v0.42.2/lib/scss_lint/linter/README.md
|
||||||
|
|
||||||
|
scss_files: 'app/javascript/styles/**/*.scss'
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- app/javascript/styles/reset.scss
|
||||||
|
|
||||||
|
linters:
|
||||||
|
# Reports when you use improper spacing around ! (the "bang") in !default,
|
||||||
|
# !global, !important, and !optional flags.
|
||||||
|
BangFormat:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Whether or not to prefer `border: 0` over `border: none`.
|
||||||
|
BorderZero:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Reports when you define a rule set using a selector with chained classes
|
||||||
|
# (a.k.a. adjoining classes).
|
||||||
|
ChainedClasses:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Prefer hexadecimal color codes over color keywords.
|
||||||
|
# (e.g. `color: green` is a color keyword)
|
||||||
|
ColorKeyword:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Prefer color literals (keywords or hexadecimal codes) to be used only in
|
||||||
|
# variable declarations. They should be referred to via variables everywhere
|
||||||
|
# else.
|
||||||
|
ColorVariable:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Which form of comments to prefer in CSS.
|
||||||
|
Comment:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Reports @debug statements (which you probably left behind accidentally).
|
||||||
|
DebugStatement:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Rule sets should be ordered as follows:
|
||||||
|
# - @extend declarations
|
||||||
|
# - @include declarations without inner @content
|
||||||
|
# - properties, @include declarations with inner @content
|
||||||
|
# - nested rule sets.
|
||||||
|
DeclarationOrder:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# `scss-lint:disable` control comments should be preceded by a comment
|
||||||
|
# explaining why these linters are being disabled for this file.
|
||||||
|
# See https://github.com/brigade/scss-lint#disabling-linters-via-source for
|
||||||
|
# more information.
|
||||||
|
DisableLinterReason:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Reports when you define the same property twice in a single rule set.
|
||||||
|
DuplicateProperty:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Separate rule, function, and mixin declarations with empty lines.
|
||||||
|
EmptyLineBetweenBlocks:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Reports when you have an empty rule set.
|
||||||
|
EmptyRule:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Reports when you have an @extend directive.
|
||||||
|
ExtendDirective:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Files should always have a final newline. This results in better diffs
|
||||||
|
# when adding lines to the file, since SCM systems such as git won't
|
||||||
|
# think that you touched the last line.
|
||||||
|
FinalNewline:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# HEX colors should use three-character values where possible.
|
||||||
|
HexLength:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# HEX color values should use lower-case colors to differentiate between
|
||||||
|
# letters and numbers, e.g. `#E3E3E3` vs. `#e3e3e3`.
|
||||||
|
HexNotation:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Avoid using ID selectors.
|
||||||
|
IdSelector:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# The basenames of @imported SCSS partials should not begin with an
|
||||||
|
# underscore and should not include the filename extension.
|
||||||
|
ImportPath:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Avoid using !important in properties. It is usually indicative of a
|
||||||
|
# misunderstanding of CSS specificity and can lead to brittle code.
|
||||||
|
ImportantRule:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Indentation should always be done in increments of 2 spaces.
|
||||||
|
Indentation:
|
||||||
|
enabled: true
|
||||||
|
width: 2
|
||||||
|
|
||||||
|
# Don't write leading zeros for numeric values with a decimal point.
|
||||||
|
LeadingZero:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Reports when you define the same selector twice in a single sheet.
|
||||||
|
MergeableSelector:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Functions, mixins, variables, and placeholders should be declared
|
||||||
|
# with all lowercase letters and hyphens instead of underscores.
|
||||||
|
NameFormat:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Avoid nesting selectors too deeply.
|
||||||
|
NestingDepth:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Always use placeholder selectors in @extend.
|
||||||
|
PlaceholderInExtend:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Sort properties in a strict order.
|
||||||
|
PropertySortOrder:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Reports when you use an unknown or disabled CSS property
|
||||||
|
# (ignoring vendor-prefixed properties).
|
||||||
|
PropertySpelling:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Configure which units are allowed for property values.
|
||||||
|
PropertyUnits:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Pseudo-elements, like ::before, and ::first-letter, should be declared
|
||||||
|
# with two colons. Pseudo-classes, like :hover and :first-child, should
|
||||||
|
# be declared with one colon.
|
||||||
|
PseudoElement:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Avoid qualifying elements in selectors (also known as "tag-qualifying").
|
||||||
|
QualifyingElement:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Don't write selectors with a depth of applicability greater than 3.
|
||||||
|
SelectorDepth:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Selectors should always use hyphenated-lowercase, rather than camelCase or
|
||||||
|
# snake_case.
|
||||||
|
SelectorFormat:
|
||||||
|
enabled: false
|
||||||
|
convention: hyphenated_lowercase
|
||||||
|
|
||||||
|
# Prefer the shortest shorthand form possible for properties that support it.
|
||||||
|
Shorthand:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Each property should have its own line, except in the special case of
|
||||||
|
# single line rulesets.
|
||||||
|
SingleLinePerProperty:
|
||||||
|
enabled: true
|
||||||
|
allow_single_line_rule_sets: true
|
||||||
|
|
||||||
|
# Split selectors onto separate lines after each comma, and have each
|
||||||
|
# individual selector occupy a single line.
|
||||||
|
SingleLinePerSelector:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Commas in lists should be followed by a space.
|
||||||
|
SpaceAfterComma:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Properties should be formatted with a single space separating the colon
|
||||||
|
# from the property's value.
|
||||||
|
SpaceAfterPropertyColon:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Properties should be formatted with no space between the name and the
|
||||||
|
# colon.
|
||||||
|
SpaceAfterPropertyName:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Variables should be formatted with a single space separating the colon
|
||||||
|
# from the variable's value.
|
||||||
|
SpaceAfterVariableColon:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Variables should be formatted with no space between the name and the
|
||||||
|
# colon.
|
||||||
|
SpaceAfterVariableName:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Operators should be formatted with a single space on both sides of an
|
||||||
|
# infix operator.
|
||||||
|
SpaceAroundOperator:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Opening braces should be preceded by a single space.
|
||||||
|
SpaceBeforeBrace:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Parentheses should not be padded with spaces.
|
||||||
|
SpaceBetweenParens:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Enforces that string literals should be written with a consistent form
|
||||||
|
# of quotes (single or double).
|
||||||
|
StringQuotes:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Property values, @extend, @include, and @import directives, and variable
|
||||||
|
# declarations should always end with a semicolon.
|
||||||
|
TrailingSemicolon:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Reports lines containing trailing whitespace.
|
||||||
|
TrailingWhitespace:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Don't write trailing zeros for numeric values with a decimal point.
|
||||||
|
TrailingZero:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Don't use the `all` keyword to specify transition properties.
|
||||||
|
TransitionAll:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Numeric values should not contain unnecessary fractional portions.
|
||||||
|
UnnecessaryMantissa:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Do not use parent selector references (&) when they would otherwise
|
||||||
|
# be unnecessary.
|
||||||
|
UnnecessaryParentReference:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# URLs should be valid and not contain protocols or domain names.
|
||||||
|
UrlFormat:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# URLs should always be enclosed within quotes.
|
||||||
|
UrlQuotes:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Properties, like color and font, are easier to read and maintain
|
||||||
|
# when defined using variables rather than literals.
|
||||||
|
VariableForProperty:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Avoid vendor prefixes. Or rather: don't write them yourself.
|
||||||
|
VendorPrefix:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# Omit length units on zero values, e.g. `0px` vs. `0`.
|
||||||
|
ZeroUnit:
|
||||||
|
enabled: true
|
||||||
22
.simplecov
22
.simplecov
@@ -1,22 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
if ENV['CI']
|
|
||||||
require 'simplecov-lcov'
|
|
||||||
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
|
|
||||||
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
|
|
||||||
else
|
|
||||||
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
|
|
||||||
end
|
|
||||||
|
|
||||||
SimpleCov.start 'rails' do
|
|
||||||
enable_coverage :branch
|
|
||||||
|
|
||||||
add_filter 'lib/linter'
|
|
||||||
|
|
||||||
add_group 'Libraries', 'lib'
|
|
||||||
add_group 'Policies', 'app/policies'
|
|
||||||
add_group 'Presenters', 'app/presenters'
|
|
||||||
add_group 'Serializers', 'app/serializers'
|
|
||||||
add_group 'Services', 'app/services'
|
|
||||||
add_group 'Validators', 'app/validators'
|
|
||||||
end
|
|
||||||
60
.travis.yml
Normal file
60
.travis.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
language: ruby
|
||||||
|
cache:
|
||||||
|
bundler: true
|
||||||
|
yarn: true
|
||||||
|
directories:
|
||||||
|
- node_modules
|
||||||
|
- public/assets
|
||||||
|
- public/packs-test
|
||||||
|
- tmp/cache/babel-loader
|
||||||
|
dist: trusty
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- LOCAL_DOMAIN=cb6e6126.ngrok.io
|
||||||
|
- LOCAL_HTTPS=true
|
||||||
|
- RAILS_ENV=test
|
||||||
|
- PARALLEL_TEST_PROCESSORS=2
|
||||||
|
- ALLOW_NOPAM=true
|
||||||
|
|
||||||
|
addons:
|
||||||
|
postgresql: 9.4
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- trusty-media
|
||||||
|
- sourceline: deb https://dl.yarnpkg.com/debian/ stable main
|
||||||
|
key_url: https://dl.yarnpkg.com/debian/pubkey.gpg
|
||||||
|
packages:
|
||||||
|
- ffmpeg
|
||||||
|
- libicu-dev
|
||||||
|
- libprotobuf-dev
|
||||||
|
- protobuf-compiler
|
||||||
|
- yarn
|
||||||
|
|
||||||
|
rvm:
|
||||||
|
- 2.4.3
|
||||||
|
- 2.5.1
|
||||||
|
|
||||||
|
services:
|
||||||
|
- redis-server
|
||||||
|
|
||||||
|
install:
|
||||||
|
- nvm install
|
||||||
|
- bundle install --path=vendor/bundle --with pam_authentication --without development production --retry=3 --jobs=16
|
||||||
|
- yarn install
|
||||||
|
|
||||||
|
# https://github.com/travis-ci/travis-ci/issues/9333
|
||||||
|
before_install:
|
||||||
|
- gem install bundler
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- travis_wait ./bin/rails parallel:create parallel:load_schema parallel:prepare assets:precompile
|
||||||
|
|
||||||
|
script:
|
||||||
|
- travis_retry bundle exec parallel_test spec/ --group-by filesize --type rspec
|
||||||
|
- yarn run test:jest
|
||||||
|
- bundle exec i18n-tasks check-normalized && bundle exec i18n-tasks unused
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"ignore_dirs": ["node_modules/", "public/"]
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
diff --git a/lib/index.js b/lib/index.js
|
|
||||||
index 16ed6be8be8f555cc99096c2ff60954b42dc313d..d009c069770d066ad0db7ad02de1ea473a29334e 100644
|
|
||||||
--- a/lib/index.js
|
|
||||||
+++ b/lib/index.js
|
|
||||||
@@ -99,7 +99,7 @@ function lodash(_ref) {
|
|
||||||
|
|
||||||
var node = _ref3;
|
|
||||||
|
|
||||||
- if ((0, _types.isModuleDeclaration)(node)) {
|
|
||||||
+ if ((0, _types.isImportDeclaration)(node) || (0, _types.isExportDeclaration)(node)) {
|
|
||||||
isModule = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
diff --git a/dist/index.js b/dist/index.js
|
|
||||||
index 57e375592d984e9a429bcd9f800fa2d15cd662e4..0c47d96df3608e23adfd77d887a8f72abbd501c0 100644
|
|
||||||
--- a/dist/index.js
|
|
||||||
+++ b/dist/index.js
|
|
||||||
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
||||||
});
|
|
||||||
exports.default = void 0;
|
|
||||||
|
|
||||||
-var _crypto = _interopRequireDefault(require("crypto"));
|
|
||||||
+var _createHash = _interopRequireDefault(require("webpack/lib/util/createHash"));
|
|
||||||
|
|
||||||
var _path = _interopRequireDefault(require("path"));
|
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ class CompressionPlugin {
|
|
||||||
originalAlgorithm: this.options.algorithm,
|
|
||||||
compressionOptions: this.options.compressionOptions,
|
|
||||||
name,
|
|
||||||
- contentHash: _crypto.default.createHash("md4").update(input).digest("hex")
|
|
||||||
+ contentHash: _createHash.default("md4").update(input).digest("hex")
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
cacheData.name = (0, _serializeJavascript.default)({
|
|
||||||
46
.yarnclean
Normal file
46
.yarnclean
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# test directories
|
||||||
|
__tests__
|
||||||
|
test
|
||||||
|
tests
|
||||||
|
powered-test
|
||||||
|
|
||||||
|
# asset directories
|
||||||
|
docs
|
||||||
|
doc
|
||||||
|
website
|
||||||
|
images
|
||||||
|
# assets
|
||||||
|
|
||||||
|
# examples
|
||||||
|
example
|
||||||
|
examples
|
||||||
|
|
||||||
|
# code coverage directories
|
||||||
|
coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# build scripts
|
||||||
|
Makefile
|
||||||
|
Gulpfile.js
|
||||||
|
Gruntfile.js
|
||||||
|
|
||||||
|
# configs
|
||||||
|
.tern-project
|
||||||
|
.gitattributes
|
||||||
|
.editorconfig
|
||||||
|
.*ignore
|
||||||
|
.eslintrc
|
||||||
|
.jshintrc
|
||||||
|
.flowconfig
|
||||||
|
.documentup.json
|
||||||
|
.yarn-metadata.json
|
||||||
|
.*.yml
|
||||||
|
*.yml
|
||||||
|
|
||||||
|
# misc
|
||||||
|
*.gz
|
||||||
|
*.md
|
||||||
|
|
||||||
|
# for specific ignore
|
||||||
|
!.svgo.yml
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
nodeLinker: node-modules
|
|
||||||
2017
AUTHORS.md
2017
AUTHORS.md
File diff suppressed because it is too large
Load Diff
7
Aptfile
7
Aptfile
@@ -1,5 +1,10 @@
|
|||||||
ffmpeg
|
ffmpeg
|
||||||
libopenblas0-pthread
|
libicu[0-9][0-9]
|
||||||
|
libicu-dev
|
||||||
|
libidn11
|
||||||
|
libidn11-dev
|
||||||
libpq-dev
|
libpq-dev
|
||||||
|
libprotobuf-dev
|
||||||
libxdamage1
|
libxdamage1
|
||||||
libxfixes3
|
libxfixes3
|
||||||
|
protobuf-compiler
|
||||||
|
|||||||
941
CHANGELOG.md
941
CHANGELOG.md
@@ -1,941 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
|
|
||||||
## [4.2.1] - 2023-10-10
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Add redirection on `/deck` URLs for logged-out users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27128))
|
|
||||||
- Add support for v4.2.0 migrations to `tootctl maintenance fix-duplicates` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27147))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Change some worker lock TTLs to be shorter-lived ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27246))
|
|
||||||
- Change user archive export allowed period from 7 days to 6 days ([suddjian](https://github.com/mastodon/mastodon/pull/27200))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix duplicate reports being sent when reporting some remote posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27355))
|
|
||||||
- Fix clicking on already-opened thread post scrolling to the top of the thread ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27331), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/27338), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/27350))
|
|
||||||
- Fix some remote posts getting truncated ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27307))
|
|
||||||
- Fix some cases of infinite scroll code trying to fetch inaccessible posts in a loop ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27286))
|
|
||||||
- Fix `Vary` headers not being set on some redirects ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27272))
|
|
||||||
- Fix mentions being matched in some URL query strings ([mjankowski](https://github.com/mastodon/mastodon/pull/25656))
|
|
||||||
- Fix unexpected linebreak in version string in the Web UI ([vmstan](https://github.com/mastodon/mastodon/pull/26986))
|
|
||||||
- Fix double scroll bars in some columns in advanced interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27187))
|
|
||||||
- Fix boosts of local users being filtered in account timelines ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27204))
|
|
||||||
- Fix multiple instances of the trend refresh scheduler sometimes running at once ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27253))
|
|
||||||
- Fix importer returning negative row estimates ([jgillich](https://github.com/mastodon/mastodon/pull/27258))
|
|
||||||
- Fix incorrectly keeping outdated update notices absent from the API endpoint ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27021))
|
|
||||||
- Fix import progress not updating on certain failures ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27247))
|
|
||||||
- Fix websocket connections being incorrectly decremented twice on errors ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/27238))
|
|
||||||
- Fix explore prompt appearing because of posts being received out of order ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27211))
|
|
||||||
- Fix explore prompt sometimes showing up when the home TL is loading ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27062))
|
|
||||||
- Fix link handling of mentions in user profiles when logged out ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27185))
|
|
||||||
- Fix filtering audit log for entries about disabling 2FA ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27186))
|
|
||||||
- Fix notification toasts not respecting reduce-motion ([c960657](https://github.com/mastodon/mastodon/pull/27178))
|
|
||||||
- Fix retention dashboard not displaying correct month ([vmstan](https://github.com/mastodon/mastodon/pull/27180))
|
|
||||||
- Fix tIME chunk not being properly removed from PNG uploads ([TheEssem](https://github.com/mastodon/mastodon/pull/27111))
|
|
||||||
- Fix division by zero in video in bitrate computation code ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27129))
|
|
||||||
- Fix inefficient queries in “Follows and followers” as well as several admin pages ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27116), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/27306))
|
|
||||||
- Fix ActiveRecord using two connection pools when no replica is defined ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27061))
|
|
||||||
- Fix the search documentation URL in system checks ([renchap](https://github.com/mastodon/mastodon/pull/27036))
|
|
||||||
|
|
||||||
## [4.2.0] - 2023-09-21
|
|
||||||
|
|
||||||
The following changelog entries focus on changes visible to users, administrators, client developers or federated software developers, but there has also been a lot of code modernization, refactoring, and tooling work, in particular by [@danielmbrasil](https://github.com/danielmbrasil), [@mjankowski](https://github.com/mjankowski), [@nschonni](https://github.com/nschonni), [@renchap](https://github.com/renchap), and [@takayamaki](https://github.com/takayamaki).
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- **Add full-text search of opted-in public posts and rework search operators** ([Gargron](https://github.com/mastodon/mastodon/pull/26485), [jsgoldstein](https://github.com/mastodon/mastodon/pull/26344), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26657), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26650), [jsgoldstein](https://github.com/mastodon/mastodon/pull/26659), [Gargron](https://github.com/mastodon/mastodon/pull/26660), [Gargron](https://github.com/mastodon/mastodon/pull/26663), [Gargron](https://github.com/mastodon/mastodon/pull/26688), [Gargron](https://github.com/mastodon/mastodon/pull/26689), [Gargron](https://github.com/mastodon/mastodon/pull/26686), [Gargron](https://github.com/mastodon/mastodon/pull/26687), [Gargron](https://github.com/mastodon/mastodon/pull/26692), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26697), [Gargron](https://github.com/mastodon/mastodon/pull/26699), [Gargron](https://github.com/mastodon/mastodon/pull/26701), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26710), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26739), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26754), [Gargron](https://github.com/mastodon/mastodon/pull/26662), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26755), [Gargron](https://github.com/mastodon/mastodon/pull/26781), [Gargron](https://github.com/mastodon/mastodon/pull/26782), [Gargron](https://github.com/mastodon/mastodon/pull/26760), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26756), [Gargron](https://github.com/mastodon/mastodon/pull/26784), [Gargron](https://github.com/mastodon/mastodon/pull/26807), [Gargron](https://github.com/mastodon/mastodon/pull/26835), [Gargron](https://github.com/mastodon/mastodon/pull/26847), [Gargron](https://github.com/mastodon/mastodon/pull/26834), [arbolitoloco1](https://github.com/mastodon/mastodon/pull/26893), [tribela](https://github.com/mastodon/mastodon/pull/26896), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26927), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26959), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/27014))
|
|
||||||
This introduces a new `public_statuses` Elasticsearch index for public posts by users who have opted in to their posts being searchable (`toot#indexable` flag).
|
|
||||||
This also revisits the other indexes to provide more useful indexing, and adds new search operators such as `from:me`, `before:2022-11-01`, `after:2022-11-01`, `during:2022-11-01`, `language:fr`, `has:poll`, or `in:library` (for searching only in posts you have written or interacted with).
|
|
||||||
Results are now ordered chronologically.
|
|
||||||
- **Add admin notifications for new Mastodon versions** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26582))
|
|
||||||
This is done by querying `https://api.joinmastodon.org/update-check` every 30 minutes in a background job.
|
|
||||||
That URL can be changed using the `UPDATE_CHECK_URL` environment variable, and the feature outright disabled by setting that variable to an empty string (`UPDATE_CHECK_URL=`).
|
|
||||||
- **Add “Privacy and reach” tab in profile settings** ([Gargron](https://github.com/mastodon/mastodon/pull/26484), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26508))
|
|
||||||
This reorganized scattered privacy and reach settings to a single place, as well as improve their wording.
|
|
||||||
- **Add display of out-of-band hashtags in the web interface** ([Gargron](https://github.com/mastodon/mastodon/pull/26492), [arbolitoloco1](https://github.com/mastodon/mastodon/pull/26497), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26506), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26525), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26606), [Gargron](https://github.com/mastodon/mastodon/pull/26666), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26960))
|
|
||||||
- **Add role badges to the web interface** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25649), [Gargron](https://github.com/mastodon/mastodon/pull/26281))
|
|
||||||
- **Add ability to pick domains to forward reports to using the `forward_to_domains` parameter in `POST /api/v1/reports`** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25866), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26636))
|
|
||||||
The `forward_to_domains` REST API parameter is a list of strings. If it is empty or omitted, the previous behavior is maintained.
|
|
||||||
The `forward` parameter still needs to be set for `forward_to_domains` to be taken into account.
|
|
||||||
The forwarded-to domains can only include that of the original author and people being replied to.
|
|
||||||
- **Add forwarding of reported replies to servers being replied to** ([Gargron](https://github.com/mastodon/mastodon/pull/25341), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26189))
|
|
||||||
- Add `ONE_CLICK_SSO_LOGIN` environment variable to directly link to the Single-Sign On provider if there is only one sign up method available ([CSDUMMI](https://github.com/mastodon/mastodon/pull/26083), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26368), [CSDUMMI](https://github.com/mastodon/mastodon/pull/26857), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26901))
|
|
||||||
- **Add webhook templating** ([Gargron](https://github.com/mastodon/mastodon/pull/23289))
|
|
||||||
- **Add webhooks for local `status.created`, `status.updated`, `account.updated` and `report.updated`** ([VyrCossont](https://github.com/mastodon/mastodon/pull/24133), [VyrCossont](https://github.com/mastodon/mastodon/pull/24243), [VyrCossont](https://github.com/mastodon/mastodon/pull/24211))
|
|
||||||
- **Add exclusive lists** ([dariusk, necropolina](https://github.com/mastodon/mastodon/pull/22048), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25324))
|
|
||||||
- **Add a confirmation screen when suspending a domain** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25144), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25603))
|
|
||||||
- **Add support for importing lists** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25203), [mgmn](https://github.com/mastodon/mastodon/pull/26120), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26372))
|
|
||||||
- **Add optional hCaptcha support** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25019), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25057), [Gargron](https://github.com/mastodon/mastodon/pull/25395), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26388))
|
|
||||||
- **Add lines to threads in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/24549), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24677), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24696), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24711), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24714), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24713), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24715), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24800), [teeerevor](https://github.com/mastodon/mastodon/pull/25706), [renchap](https://github.com/mastodon/mastodon/pull/25807))
|
|
||||||
- **Add new onboarding flow to web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/24619), [Gargron](https://github.com/mastodon/mastodon/pull/24646), [Gargron](https://github.com/mastodon/mastodon/pull/24705), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24872), [ThisIsMissEm](https://github.com/mastodon/mastodon/pull/24883), [Gargron](https://github.com/mastodon/mastodon/pull/24954), [stevenjlm](https://github.com/mastodon/mastodon/pull/24959), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25010), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25275), [Gargron](https://github.com/mastodon/mastodon/pull/25559), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25561))
|
|
||||||
- **Add auto-refresh of accounts we get new messages/edits of** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26510))
|
|
||||||
- **Add Elasticsearch cluster health check and indexes mismatch check to dashboard** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26448), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26605), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26658))
|
|
||||||
- Add `hide_collections`, `discoverable` and `indexable` attributes to credentials API ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26998))
|
|
||||||
- Add `S3_ENABLE_CHECKSUM_MODE` environment variable to enable checksum verification on compatible S3-providers ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26435))
|
|
||||||
- Add admin API for managing tags ([rrgeorge](https://github.com/mastodon/mastodon/pull/26872))
|
|
||||||
- Add a link to hashtag timelines from the Trending hashtags moderation interface ([gunchleoc](https://github.com/mastodon/mastodon/pull/26724))
|
|
||||||
- Add timezone to datetimes in e-mails ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26822))
|
|
||||||
- Add `authorized_fetch` server setting in addition to env var ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25798), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26958))
|
|
||||||
- Add avatar image to webfinger responses ([tvler](https://github.com/mastodon/mastodon/pull/26558))
|
|
||||||
- Add debug logging on signature verification failure ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26637), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26812))
|
|
||||||
- Add explicit error messages when DeepL quota is exceeded ([lutoma](https://github.com/mastodon/mastodon/pull/26704))
|
|
||||||
- Add Elasticsearch/OpenSearch version to “Software” in admin dashboard ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26652))
|
|
||||||
- Add `data-nosnippet` attribute to remote posts and local posts with `noindex` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26648))
|
|
||||||
- Add support for federating `memorial` attribute ([rrgeorge](https://github.com/mastodon/mastodon/pull/26583))
|
|
||||||
- Add Cherokee and Kalmyk to languages dropdown ([gunchleoc](https://github.com/mastodon/mastodon/pull/26012), [gunchleoc](https://github.com/mastodon/mastodon/pull/26013))
|
|
||||||
- Add `DELETE /api/v1/profile/avatar` and `DELETE /api/v1/profile/header` to the REST API ([danielmbrasil](https://github.com/mastodon/mastodon/pull/25124), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26573))
|
|
||||||
- Add `ES_PRESET` option to customize numbers of shards and replicas ([Gargron](https://github.com/mastodon/mastodon/pull/26483), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26489))
|
|
||||||
This can have a value of `single_node_cluster` (default), `small_cluster` (uses one replica) or `large_cluster` (uses one replica and a higher number of shards).
|
|
||||||
- Add `CACHE_BUSTER_HTTP_METHOD` environment variable ([renchap](https://github.com/mastodon/mastodon/pull/26528), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26542))
|
|
||||||
- Add support for `DB_PASS` when using `DATABASE_URL` ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/26295))
|
|
||||||
- Add `GET /api/v1/instance/languages` to REST API ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24443))
|
|
||||||
- Add primary key to `preview_cards_statuses` join table ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25243), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26384), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26447), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26737), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26979))
|
|
||||||
- Add client-side timeout on resend confirmation button ([Gargron](https://github.com/mastodon/mastodon/pull/26300))
|
|
||||||
- Add published date and author to news on the explore screen in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26155))
|
|
||||||
- Add `lang` attribute to various UI components ([c960657](https://github.com/mastodon/mastodon/pull/23869), [c960657](https://github.com/mastodon/mastodon/pull/23891), [c960657](https://github.com/mastodon/mastodon/pull/26111), [c960657](https://github.com/mastodon/mastodon/pull/26149))
|
|
||||||
- Add stricter protocol fields validation for accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25937))
|
|
||||||
- Add support for Azure blob storage ([mistydemeo](https://github.com/mastodon/mastodon/pull/23607), [mistydemeo](https://github.com/mastodon/mastodon/pull/26080))
|
|
||||||
- Add toast with option to open post after publishing in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25564), [Signez](https://github.com/mastodon/mastodon/pull/25919), [Gargron](https://github.com/mastodon/mastodon/pull/26664))
|
|
||||||
- Add canonical link tags in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25715))
|
|
||||||
- Add button to see results for polls in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25726))
|
|
||||||
- Add at-symbol prepended to mention span title ([forsamori](https://github.com/mastodon/mastodon/pull/25684))
|
|
||||||
- Add users index on `unconfirmed_email` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25672), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25702))
|
|
||||||
- Add superapp index on `oauth_applications` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25670))
|
|
||||||
- Add index to backups on `user_id` column ([mjankowski](https://github.com/mastodon/mastodon/pull/25647))
|
|
||||||
- Add onboarding prompt when home feed too slow in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25267), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25556), [Gargron](https://github.com/mastodon/mastodon/pull/25579), [renchap](https://github.com/mastodon/mastodon/pull/25580), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25581), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25617), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25917), [Gargron](https://github.com/mastodon/mastodon/pull/26829), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26935))
|
|
||||||
- Add `POST /api/v1/conversations/:id/unread` API endpoint to mark a conversation as unread ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25509))
|
|
||||||
- Add `translate="no"` to outgoing mentions and links ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25524))
|
|
||||||
- Add unsubscribe link and headers to e-mails ([Gargron](https://github.com/mastodon/mastodon/pull/25378), [c960657](https://github.com/mastodon/mastodon/pull/26085))
|
|
||||||
- Add logging of websocket send errors ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25280))
|
|
||||||
- Add time zone preference ([Gargron](https://github.com/mastodon/mastodon/pull/25342), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26025))
|
|
||||||
- Add `legal` as report category ([Gargron](https://github.com/mastodon/mastodon/pull/23941), [renchap](https://github.com/mastodon/mastodon/pull/25400), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26509))
|
|
||||||
- Add `data-nosnippet` so Google doesn't use trending posts in snippets for `/` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25279))
|
|
||||||
- Add card with who invited you to join when displaying rules on sign-up ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23475))
|
|
||||||
- Add missing primary keys to `accounts_tags` and `statuses_tags` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25210))
|
|
||||||
- Add support for custom sign-up URLs ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25014), [renchap](https://github.com/mastodon/mastodon/pull/25108), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25190), [mgmn](https://github.com/mastodon/mastodon/pull/25531))
|
|
||||||
This is set using `SSO_ACCOUNT_SIGN_UP` and reflected in the REST API by adding `registrations.sign_up_url` to the `/api/v2/instance` endpoint.
|
|
||||||
- Add polling and automatic redirection to `/start` on email confirmation ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25013))
|
|
||||||
- Add ability to block sign-ups from IP using the CLI ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24870))
|
|
||||||
- Add ALT badges to media that has alternative text in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24782), [c960657](https://github.com/mastodon/mastodon/pull/26166)
|
|
||||||
- Add ability to include accounts with pending follow requests in lists ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19727), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24810))
|
|
||||||
- Add trend management to admin API ([rrgeorge](https://github.com/mastodon/mastodon/pull/24257))
|
|
||||||
- `POST /api/v1/admin/trends/statuses/:id/approve`
|
|
||||||
- `POST /api/v1/admin/trends/statuses/:id/reject`
|
|
||||||
- `POST /api/v1/admin/trends/links/:id/approve`
|
|
||||||
- `POST /api/v1/admin/trends/links/:id/reject`
|
|
||||||
- `POST /api/v1/admin/trends/tags/:id/approve`
|
|
||||||
- `POST /api/v1/admin/trends/tags/:id/reject`
|
|
||||||
- `GET /api/v1/admin/trends/links/publishers`
|
|
||||||
- `POST /api/v1/admin/trends/links/publishers/:id/approve`
|
|
||||||
- `POST /api/v1/admin/trends/links/publishers/:id/reject`
|
|
||||||
- Add user handle to notification mail recipient address ([HeitorMC](https://github.com/mastodon/mastodon/pull/24240))
|
|
||||||
- Add progress indicator to sign-up flow ([Gargron](https://github.com/mastodon/mastodon/pull/24545))
|
|
||||||
- Add client-side validation for taken username in sign-up form ([Gargron](https://github.com/mastodon/mastodon/pull/24546))
|
|
||||||
- Add `--approve` option to `tootctl accounts create` ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24533))
|
|
||||||
- Add “In Memoriam” banner back to profiles ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23591), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23614))
|
|
||||||
This adds the `memorial` attribute to the `Account` REST API entity.
|
|
||||||
- Add colour to follow button when hashtag is being followed ([c960657](https://github.com/mastodon/mastodon/pull/24361))
|
|
||||||
- Add further explanations to the profile link verification instructions ([drzax](https://github.com/mastodon/mastodon/pull/19723))
|
|
||||||
- Add a link to Identity provider's account settings from the account settings ([CSDUMMI](https://github.com/mastodon/mastodon/pull/24100), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24628))
|
|
||||||
- Add support for streaming server to connect to postgres with self-signed certs through the `sslmode` URL parameter ([ramuuns](https://github.com/mastodon/mastodon/pull/21431))
|
|
||||||
- Add support for specifying S3 storage classes through the `S3_STORAGE_CLASS` environment variable ([hyl](https://github.com/mastodon/mastodon/pull/22480))
|
|
||||||
- Add support for incoming rich text ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23913))
|
|
||||||
- Add support for Ruby 3.2 ([tenderlove](https://github.com/mastodon/mastodon/pull/22928), [casperisfine](https://github.com/mastodon/mastodon/pull/24142), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24202), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26934))
|
|
||||||
- Add API parameter to safeguard unexpected mentions in new posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18350))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- **Change hashtags to be displayed separately when they are the last line of a post** ([renchap](https://github.com/mastodon/mastodon/pull/26499), [renchap](https://github.com/mastodon/mastodon/pull/26614), [renchap](https://github.com/mastodon/mastodon/pull/26615))
|
|
||||||
- **Change reblogs to be excluded from "Posts and replies" tab in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/26302))
|
|
||||||
- **Change interaction modal in web interface** ([Gargron, ClearlyClaire](https://github.com/mastodon/mastodon/pull/26075), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26269), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26268), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26267), [mgmn](https://github.com/mastodon/mastodon/pull/26459), [tribela](https://github.com/mastodon/mastodon/pull/26461), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26593), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26795))
|
|
||||||
- **Change design of link previews in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/26136), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26151), [Gargron](https://github.com/mastodon/mastodon/pull/26153), [Gargron](https://github.com/mastodon/mastodon/pull/26250), [Gargron](https://github.com/mastodon/mastodon/pull/26287), [Gargron](https://github.com/mastodon/mastodon/pull/26286), [c960657](https://github.com/mastodon/mastodon/pull/26184))
|
|
||||||
- **Change "direct message" nomenclature to "private mention" in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/24248))
|
|
||||||
- **Change translation feature to cover Content Warnings, poll options and media descriptions** ([c960657](https://github.com/mastodon/mastodon/pull/24175), [S-H-GAMELINKS](https://github.com/mastodon/mastodon/pull/25251), [c960657](https://github.com/mastodon/mastodon/pull/26168), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26452))
|
|
||||||
- **Change account search to match by text when opted-in** ([jsgoldstein](https://github.com/mastodon/mastodon/pull/25599), [Gargron](https://github.com/mastodon/mastodon/pull/26378))
|
|
||||||
- **Change import feature to be clearer, less error-prone and more reliable** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21054), [mgmn](https://github.com/mastodon/mastodon/pull/24874))
|
|
||||||
- **Change local and federated timelines to be tabs of a single “Live feeds” column** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25641), [Gargron](https://github.com/mastodon/mastodon/pull/25683), [mgmn](https://github.com/mastodon/mastodon/pull/25694), [Plastikmensch](https://github.com/mastodon/mastodon/pull/26247), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26633))
|
|
||||||
- **Change user archive export to be faster and more reliable, and export `.zip` archives instead of `.tar.gz` ones** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23360), [TheEssem](https://github.com/mastodon/mastodon/pull/25034))
|
|
||||||
- **Change `mastodon-streaming` systemd unit files to be templated** ([e-nomem](https://github.com/mastodon/mastodon/pull/24751))
|
|
||||||
- **Change `statsd` integration to disable sidekiq metrics by default** ([mjankowski](https://github.com/mastodon/mastodon/pull/25265), [mjankowski](https://github.com/mastodon/mastodon/pull/25336), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26310))
|
|
||||||
This deprecates `statsd` support and disables the sidekiq integration unless `STATSD_SIDEKIQ` is set to `true`.
|
|
||||||
This is because the `nsa` gem is unmaintained, and its sidekiq integration is known to add very significant overhead.
|
|
||||||
Later versions of Mastodon will have other ways to get the same metrics.
|
|
||||||
- **Change replica support to native Rails adapter** ([krainboltgreene](https://github.com/mastodon/mastodon/pull/25693), [Gargron](https://github.com/mastodon/mastodon/pull/25849), [Gargron](https://github.com/mastodon/mastodon/pull/25874), [Gargron](https://github.com/mastodon/mastodon/pull/25851), [Gargron](https://github.com/mastodon/mastodon/pull/25977), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26074), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26326), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26386), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26856))
|
|
||||||
This is a breaking change, dropping `makara` support, and requiring you to update your database configuration if you are using replicas.
|
|
||||||
To tell Mastodon to use a read replica, you can either set the `REPLICA_DB_NAME` environment variable (along with `REPLICA_DB_USER`, `REPLICA_DB_PASS`, `REPLICA_DB_HOST`, and `REPLICA_DB_PORT`, if they differ from the primary database), or the `REPLICA_DATABASE_URL` environment variable if your configuration is based on `DATABASE_URL`.
|
|
||||||
- Change DCT method used for JPEG encoding to float ([electroCutie](https://github.com/mastodon/mastodon/pull/26675))
|
|
||||||
- Change from `node-redis` to `ioredis` for streaming ([gmemstr](https://github.com/mastodon/mastodon/pull/26581))
|
|
||||||
- Change private statuses index to index without crutches ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26713))
|
|
||||||
- Change video compression parameters ([Gargron](https://github.com/mastodon/mastodon/pull/26631), [Gargron](https://github.com/mastodon/mastodon/pull/26745), [Gargron](https://github.com/mastodon/mastodon/pull/26766), [Gargron](https://github.com/mastodon/mastodon/pull/26970))
|
|
||||||
- Change admin e-mail notification settings to be their own settings group ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26596))
|
|
||||||
- Change opacity of the delete icon in the search field to be more visible ([AntoninDelFabbro](https://github.com/mastodon/mastodon/pull/26449))
|
|
||||||
- Change Account Search to prioritize username over display name ([jsgoldstein](https://github.com/mastodon/mastodon/pull/26623))
|
|
||||||
- Change follow recommendation materialized view to be faster in most cases ([renchap, ClearlyClaire](https://github.com/mastodon/mastodon/pull/26545))
|
|
||||||
- Change `robots.txt` to block GPTBot ([Foritus](https://github.com/mastodon/mastodon/pull/26396))
|
|
||||||
- Change header of hashtag timelines in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26362), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26416))
|
|
||||||
- Change streaming `/metrics` to include additional metrics ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/26299), [ThisIsMissEm](https://github.com/mastodon/mastodon/pull/26945))
|
|
||||||
- Change indexing frequency from 5 minutes to 1 minute, add locks to schedulers ([Gargron](https://github.com/mastodon/mastodon/pull/26304))
|
|
||||||
- Change column link to add a better keyboard focus indicator ([teeerevor](https://github.com/mastodon/mastodon/pull/26278))
|
|
||||||
- Change poll form element colors to fit with the rest of the ui ([teeerevor](https://github.com/mastodon/mastodon/pull/26139), [teeerevor](https://github.com/mastodon/mastodon/pull/26162), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26164))
|
|
||||||
- Change 'favourite' to 'favorite' for American English ([marekr](https://github.com/mastodon/mastodon/pull/24667), [gunchleoc](https://github.com/mastodon/mastodon/pull/26009), [nabijaczleweli](https://github.com/mastodon/mastodon/pull/26109))
|
|
||||||
- Change ActivityStreams representation of suspended accounts to not use a blank `name` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25276))
|
|
||||||
- Change focus UI for keyboard only input ([teeerevor](https://github.com/mastodon/mastodon/pull/25935), [Gargron](https://github.com/mastodon/mastodon/pull/26125), [Gargron](https://github.com/mastodon/mastodon/pull/26767))
|
|
||||||
- Change thread view to scroll to the selected post rather than the post being replied to ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24685))
|
|
||||||
- Change links in multi-column mode so tabs are open in single-column mode ([Signez](https://github.com/mastodon/mastodon/pull/25893), [Signez](https://github.com/mastodon/mastodon/pull/26070), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25973), [Signez](https://github.com/mastodon/mastodon/pull/26019), [Signez](https://github.com/mastodon/mastodon/pull/26759))
|
|
||||||
- Change searching with `#` to include account index ([jsgoldstein](https://github.com/mastodon/mastodon/pull/25638))
|
|
||||||
- Change label and design of sensitive and unavailable media in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25712), [Gargron](https://github.com/mastodon/mastodon/pull/26135), [Gargron](https://github.com/mastodon/mastodon/pull/26330))
|
|
||||||
- Change button colors to increase hover/focus contrast and consistency ([teeerevor](https://github.com/mastodon/mastodon/pull/25677), [Gargron](https://github.com/mastodon/mastodon/pull/25679))
|
|
||||||
- Change dropdown icon above compose form from ellipsis to bars in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25661))
|
|
||||||
- Change header backgrounds to use fewer different colors in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25577))
|
|
||||||
- Change files to be deleted in batches instead of one-by-one ([Gargron](https://github.com/mastodon/mastodon/pull/23302), [S-H-GAMELINKS](https://github.com/mastodon/mastodon/pull/25586), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25587))
|
|
||||||
- Change emoji picker icon ([iparr](https://github.com/mastodon/mastodon/pull/25479))
|
|
||||||
- Change edit profile page ([Gargron](https://github.com/mastodon/mastodon/pull/25413), [c960657](https://github.com/mastodon/mastodon/pull/26538))
|
|
||||||
- Change "bot" label to "automated" ([Gargron](https://github.com/mastodon/mastodon/pull/25356))
|
|
||||||
- Change design of dropdowns in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25107))
|
|
||||||
- Change wording of “Content cache retention period” setting to highlight destructive implications ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23261))
|
|
||||||
- Change autolinking to allow carets in URL search params ([renchap](https://github.com/mastodon/mastodon/pull/25216))
|
|
||||||
- Change share action from being in action bar to being in dropdown in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25105))
|
|
||||||
- Change sessions to be ordered from most-recent to least-recently updated ([frankieroberto](https://github.com/mastodon/mastodon/pull/25005))
|
|
||||||
- Change vacuum scheduler to also delete expired tokens and unused application records ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24868), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24871))
|
|
||||||
- Change "Sign in" to "Login" ([Gargron](https://github.com/mastodon/mastodon/pull/24942))
|
|
||||||
- Change domain suspensions to also be checked before trying to fetch unknown remote resources ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24535))
|
|
||||||
- Change media components to use aspect-ratio rather than compute height themselves ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24686), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24943), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26801))
|
|
||||||
- Change logo version in header based on screen size in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24707))
|
|
||||||
- Change label from "For you" to "People" on explore screen in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24706))
|
|
||||||
- Change logged-out WebUI HTML pages to be cached for a few seconds ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24708))
|
|
||||||
- Change unauthenticated responses to be cached in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/24348), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24662), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24665))
|
|
||||||
- Change HTTP caching logic ([Gargron](https://github.com/mastodon/mastodon/pull/24347), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24604))
|
|
||||||
- Change hashtags and mentions in bios to open in-app in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24643))
|
|
||||||
- Change styling of the recommended accounts to allow bio to be more visible ([chike00](https://github.com/mastodon/mastodon/pull/24480))
|
|
||||||
- Change account search in moderation interface to allow searching by username including the leading `@` ([HeitorMC](https://github.com/mastodon/mastodon/pull/24242))
|
|
||||||
- Change all components to use the same error page in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24512))
|
|
||||||
- Change search pop-out in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24305))
|
|
||||||
- Change user settings to be stored in a more optimal way ([Gargron](https://github.com/mastodon/mastodon/pull/23630), [c960657](https://github.com/mastodon/mastodon/pull/24321), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24453), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24460), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24558), [Gargron](https://github.com/mastodon/mastodon/pull/24761), [Gargron](https://github.com/mastodon/mastodon/pull/24783), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25508), [jsgoldstein](https://github.com/mastodon/mastodon/pull/25340), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26884), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/27012))
|
|
||||||
- Change media upload limits and remove client-side resizing ([Gargron](https://github.com/mastodon/mastodon/pull/23726))
|
|
||||||
- Change design of account rows in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24247), [Gargron](https://github.com/mastodon/mastodon/pull/24343), [Gargron](https://github.com/mastodon/mastodon/pull/24956), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25131))
|
|
||||||
- Change log-out to use Single Logout when using external log-in through OIDC ([CSDUMMI](https://github.com/mastodon/mastodon/pull/24020))
|
|
||||||
- Change sidekiq-bulk's batch size from 10,000 to 1,000 jobs in one Redis call ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24034))
|
|
||||||
- Change translation to only be offered for supported languages ([c960657](https://github.com/mastodon/mastodon/pull/23879), [c960657](https://github.com/mastodon/mastodon/pull/24037))
|
|
||||||
This adds the `/api/v1/instance/translation_languages` REST API endpoint that returns an object with the supported translation language pairs in the form:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"fr": ["en", "de"]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
(where `fr` is a supported source language and `en` and `de` or supported output language when translating a `fr` string)
|
|
||||||
- Change compose form checkbox to native input with `appearance: none` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22949))
|
|
||||||
- Change posts' clickable area to be larger ([c960657](https://github.com/mastodon/mastodon/pull/23621))
|
|
||||||
- Change `followed_by` link to `location=all` if account is local on /admin/accounts/:id page ([tribela](https://github.com/mastodon/mastodon/pull/23467))
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
|
|
||||||
- **Remove support for Node.js 14** ([renchap](https://github.com/mastodon/mastodon/pull/25198))
|
|
||||||
- **Remove support for Ruby 2.7** ([nschonni](https://github.com/mastodon/mastodon/pull/24237))
|
|
||||||
- **Remove clustering from streaming API** ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/24655))
|
|
||||||
- **Remove anonymous access to the streaming API** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23989))
|
|
||||||
- Remove obfuscation of reply count in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26768))
|
|
||||||
- Remove `kmr` from language selection, as it was a duplicate for `ku` ([gunchleoc](https://github.com/mastodon/mastodon/pull/26014), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26787))
|
|
||||||
- Remove 16:9 cropping from web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26132))
|
|
||||||
- Remove back button from bookmarks, favourites and lists screens in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26126))
|
|
||||||
- Remove display name input from sign-up form ([Gargron](https://github.com/mastodon/mastodon/pull/24704))
|
|
||||||
- Remove `tai` locale ([c960657](https://github.com/mastodon/mastodon/pull/23880))
|
|
||||||
- Remove empty Kushubian (csb) local files ([nschonni](https://github.com/mastodon/mastodon/pull/24151))
|
|
||||||
- Remove `Permissions-Policy` header from all responses ([Gargron](https://github.com/mastodon/mastodon/pull/24124))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- **Fix filters not being applying in the explore page** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25887))
|
|
||||||
- **Fix being unable to load past a full page of filtered posts in Home timeline** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24930))
|
|
||||||
- **Fix log-in flow when involving both OAuth and external authentication** ([CSDUMMI](https://github.com/mastodon/mastodon/pull/24073))
|
|
||||||
- **Fix broken links in account gallery** ([c960657](https://github.com/mastodon/mastodon/pull/24218))
|
|
||||||
- **Fix migration handler not updating lists** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24808))
|
|
||||||
- Fix crash when viewing a moderation appeal and the moderator account has been deleted ([xrobau](https://github.com/mastodon/mastodon/pull/25900))
|
|
||||||
- Fix error in Web UI when server rules cannot be fetched ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26957))
|
|
||||||
- Fix paragraph margins resulting in irregular read-more cut-off in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26828))
|
|
||||||
- Fix notification permissions being requested immediately after login ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26472))
|
|
||||||
- Fix performances of profile directory ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26840), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26842))
|
|
||||||
- Fix mute button and volume slider feeling disconnected in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26827), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26860))
|
|
||||||
- Fix “Scoped order is ignored, it's forced to be batch order.” warnings ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26793))
|
|
||||||
- Fix blocked domain appearing in account feeds ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26823))
|
|
||||||
- Fix invalid `Content-Type` header for WebP images ([c960657](https://github.com/mastodon/mastodon/pull/26773))
|
|
||||||
- Fix minor inefficiencies in `tootctl search deploy` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26721))
|
|
||||||
- Fix filter form in profiles directory overflowing instead of wrapping ([arbolitoloco1](https://github.com/mastodon/mastodon/pull/26682))
|
|
||||||
- Fix sign up steps progress layout in right-to-left locales ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26728))
|
|
||||||
- Fix bug with “favorited by” and “reblogged by“ view on posts only showing up to 40 items ([timothyjrogers](https://github.com/mastodon/mastodon/pull/26577), [timothyjrogers](https://github.com/mastodon/mastodon/pull/26574))
|
|
||||||
- Fix bad search type heuristic ([Gargron](https://github.com/mastodon/mastodon/pull/26673))
|
|
||||||
- Fix not being able to negate prefix clauses in search ([Gargron](https://github.com/mastodon/mastodon/pull/26672))
|
|
||||||
- Fix timeout on invalid set of exclusionary parameters in `/api/v1/timelines/public` ([danielmbrasil](https://github.com/mastodon/mastodon/pull/26239))
|
|
||||||
- Fix adding column with default value taking longer on Postgres >= 11 ([Gargron](https://github.com/mastodon/mastodon/pull/26375))
|
|
||||||
- Fix light theme select option for hashtags ([teeerevor](https://github.com/mastodon/mastodon/pull/26311))
|
|
||||||
- Fix AVIF attachments ([c960657](https://github.com/mastodon/mastodon/pull/26264))
|
|
||||||
- Fix incorrect URL normalization when fetching remote resources ([c960657](https://github.com/mastodon/mastodon/pull/26219), [c960657](https://github.com/mastodon/mastodon/pull/26285))
|
|
||||||
- Fix being unable to filter posts for individual Chinese languages ([gunchleoc](https://github.com/mastodon/mastodon/pull/26066))
|
|
||||||
- Fix preview card sometimes linking to 4xx error pages ([c960657](https://github.com/mastodon/mastodon/pull/26200))
|
|
||||||
- Fix emoji picker button scrolling with textarea content in single-column view ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25304))
|
|
||||||
- Fix missing border on error screen in light theme in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/26152))
|
|
||||||
- Fix UI overlap with the loupe icon in the Explore Tab ([gol-cha](https://github.com/mastodon/mastodon/pull/26113))
|
|
||||||
- Fix unexpected redirection to `/explore` after sign-in ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26143))
|
|
||||||
- Fix `/api/v1/statuses/:id/unfavourite` and `/api/v1/statuses/:id/unreblog` returning non-updated counts ([c960657](https://github.com/mastodon/mastodon/pull/24365))
|
|
||||||
- Fix clicking the “Back” button sometimes leading out of Mastodon ([c960657](https://github.com/mastodon/mastodon/pull/23953), [CSFlorin](https://github.com/mastodon/mastodon/pull/24835), [S-H-GAMELINKS](https://github.com/mastodon/mastodon/pull/24867), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25281))
|
|
||||||
- Fix processing of `null` ActivityPub activities ([tribela](https://github.com/mastodon/mastodon/pull/26021))
|
|
||||||
- Fix hashtag posts not being removed from home feed on hashtag unfollow ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26028))
|
|
||||||
- Fix for "follows you" indicator in light web UI not readable ([vmstan](https://github.com/mastodon/mastodon/pull/25993))
|
|
||||||
- Fix incorrect line break between icon and number of reposts & favourites ([edent](https://github.com/mastodon/mastodon/pull/26004))
|
|
||||||
- Fix sounds not being loaded from assets host ([Signez](https://github.com/mastodon/mastodon/pull/25931))
|
|
||||||
- Fix buttons showing inconsistent styles ([teeerevor](https://github.com/mastodon/mastodon/pull/25903), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25965), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26341), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/26482))
|
|
||||||
- Fix trend calculation working on too many items at a time ([Gargron](https://github.com/mastodon/mastodon/pull/25835))
|
|
||||||
- Fix dropdowns being disabled for logged out users in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25714), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25964))
|
|
||||||
- Fix explore page being inaccessible when opted-out of trends in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25716))
|
|
||||||
- Fix re-activated accounts possibly getting deleted by `AccountDeletionWorker` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25711))
|
|
||||||
- Fix `/api/v2/search` not working with following query param ([danielmbrasil](https://github.com/mastodon/mastodon/pull/25681))
|
|
||||||
- Fix inefficient query when requesting a new confirmation email from a logged-in account ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25669))
|
|
||||||
- Fix unnecessary concurrent calls to `/api/*/instance` in web UI ([mgmn](https://github.com/mastodon/mastodon/pull/25663))
|
|
||||||
- Fix resolving local URL for remote content ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25637))
|
|
||||||
- Fix search not being easily findable on smaller screens in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25576), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25631))
|
|
||||||
- Fix j/k keyboard shortcuts on some status lists ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25554))
|
|
||||||
- Fix missing validation on `default_privacy` setting ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25513))
|
|
||||||
- Fix incorrect pagination headers in `/api/v2/admin/accounts` ([danielmbrasil](https://github.com/mastodon/mastodon/pull/25477))
|
|
||||||
- Fix non-interactive upload container being given a `button` role and tabIndex ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25462))
|
|
||||||
- Fix always redirecting to onboarding in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/25396))
|
|
||||||
- Fix inconsistent use of middle dot (·) instead of bullet (•) to separate items ([j-f1](https://github.com/mastodon/mastodon/pull/25248))
|
|
||||||
- Fix spacing of middle dots in the detailed status meta section ([j-f1](https://github.com/mastodon/mastodon/pull/25247))
|
|
||||||
- Fix prev/next buttons color in media viewer ([renchap](https://github.com/mastodon/mastodon/pull/25231))
|
|
||||||
- Fix email addresses not being properly updated in `tootctl maintenance fix-duplicates` ([mjankowski](https://github.com/mastodon/mastodon/pull/25118))
|
|
||||||
- Fix unicode surrogate pairs sometimes being broken in page title ([eai04191](https://github.com/mastodon/mastodon/pull/25148))
|
|
||||||
- Fix various inefficient queries against account domains ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25126))
|
|
||||||
- Fix video player offering to expand in a lightbox when it's in an `iframe` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25067))
|
|
||||||
- Fix post embed previews ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25071))
|
|
||||||
- Fix inadequate error handling in several API controllers when given invalid parameters ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24947), [danielmbrasil](https://github.com/mastodon/mastodon/pull/24958), [danielmbrasil](https://github.com/mastodon/mastodon/pull/25063), [danielmbrasil](https://github.com/mastodon/mastodon/pull/25072), [danielmbrasil](https://github.com/mastodon/mastodon/pull/25386), [danielmbrasil](https://github.com/mastodon/mastodon/pull/25595))
|
|
||||||
- Fix uncaught `ActiveRecord::StatementInvalid` in Mastodon::IpBlocksCLI ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24861))
|
|
||||||
- Fix various edge cases with local moves ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24812))
|
|
||||||
- Fix `tootctl accounts cull` crashing when encountering a domain resolving to a private address ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23378))
|
|
||||||
- Fix `tootctl accounts approve --number N` not aproving the N earliest registrations ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24605))
|
|
||||||
- Fix being unable to clear media description when editing posts ([c960657](https://github.com/mastodon/mastodon/pull/24720))
|
|
||||||
- Fix unavailable translations not falling back to English ([mgmn](https://github.com/mastodon/mastodon/pull/24727))
|
|
||||||
- Fix anonymous visitors getting a session cookie on first visit ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24584), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24650), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24664))
|
|
||||||
- Fix cutting off first letter of hashtag links sometimes in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/24623))
|
|
||||||
- Fix crash in `tootctl accounts create --reattach --force` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24557), [danielmbrasil](https://github.com/mastodon/mastodon/pull/24680))
|
|
||||||
- Fix characters being emojified even when using Variation Selector 15 (text) ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20949), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24615))
|
|
||||||
- Fix uncaught ActiveRecord::StatementInvalid exception in `Mastodon::AccountsCLI#approve` ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24590))
|
|
||||||
- Fix email confirmation skip option in `tootctl accounts modify USERNAME --email EMAIL --confirm` ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24578))
|
|
||||||
- Fix tooltip for dates without time ([c960657](https://github.com/mastodon/mastodon/pull/24244))
|
|
||||||
- Fix missing loading spinner and loading more on scroll in Private Mentions column ([c960657](https://github.com/mastodon/mastodon/pull/24446))
|
|
||||||
- Fix account header image missing from `/settings/profile` on narrow screens ([c960657](https://github.com/mastodon/mastodon/pull/24433))
|
|
||||||
- Fix height of announcements not being updated when using reduced animations ([c960657](https://github.com/mastodon/mastodon/pull/24354))
|
|
||||||
- Fix inconsistent radius in advanced interface drawer ([thislight](https://github.com/mastodon/mastodon/pull/24407))
|
|
||||||
- Fix loading more trending posts on scroll in the advanced interface ([OmmyZhang](https://github.com/mastodon/mastodon/pull/24314))
|
|
||||||
- Fix poll ending notification for edited polls ([c960657](https://github.com/mastodon/mastodon/pull/24311))
|
|
||||||
- Fix max width of media in `/about` and `/privacy-policy` ([mgmn](https://github.com/mastodon/mastodon/pull/24180))
|
|
||||||
- Fix streaming API not being usable without `DATABASE_URL` ([Gargron](https://github.com/mastodon/mastodon/pull/23960))
|
|
||||||
- Fix external authentication not running onboarding code for new users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23458))
|
|
||||||
|
|
||||||
## [4.1.8] - 2023-09-19
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix post edits not being forwarded as expected ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26936))
|
|
||||||
- Fix moderator rights inconsistencies ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26729))
|
|
||||||
- Fix crash when encountering invalid URL ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26814))
|
|
||||||
- Fix cached posts including stale stats ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26409))
|
|
||||||
- Fix uploading of video files for which `ffprobe` reports `0/0` average framerate ([NicolaiSoeborg](https://github.com/mastodon/mastodon/pull/26500))
|
|
||||||
- Fix unexpected audio stream transcoding when uploaded video is eligible to passthrough ([yufushiro](https://github.com/mastodon/mastodon/pull/26608))
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Fix missing HTML sanitization in translation API (CVE-2023-42452, [GHSA-2693-xr3m-jhqr](https://github.com/mastodon/mastodon/security/advisories/GHSA-2693-xr3m-jhqr))
|
|
||||||
- Fix incorrect domain name normalization (CVE-2023-42451, [GHSA-v3xf-c9qf-j667](https://github.com/mastodon/mastodon/security/advisories/GHSA-v3xf-c9qf-j667))
|
|
||||||
|
|
||||||
## [4.1.7] - 2023-09-05
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Change remote report processing to accept reports with long comments, but truncate them ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25028))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- **Fix blocking subdomains of an already-blocked domain** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26392))
|
|
||||||
- Fix `/api/v1/timelines/tag/:hashtag` allowing for unauthenticated access when public preview is disabled ([danielmbrasil](https://github.com/mastodon/mastodon/pull/26237))
|
|
||||||
- Fix inefficiencies in `PlainTextFormatter` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26727))
|
|
||||||
|
|
||||||
## [4.1.6] - 2023-07-31
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix memory leak in streaming server ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/26228))
|
|
||||||
- Fix wrong filters sometimes applying in streaming ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26159), [ThisIsMissEm](https://github.com/mastodon/mastodon/pull/26213), [renchap](https://github.com/mastodon/mastodon/pull/26233))
|
|
||||||
- Fix incorrect connect timeout in outgoing requests ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26116))
|
|
||||||
|
|
||||||
## [4.1.5] - 2023-07-21
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Add check preventing Sidekiq workers from running with Makara configured ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25850))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Change request timeout handling to use a longer deadline ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26055))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix moderation interface for remote instances with a .zip TLD ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25885))
|
|
||||||
- Fix remote accounts being possibly persisted to database with incomplete protocol values ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25886))
|
|
||||||
- Fix trending publishers table not rendering correctly on narrow screens ([vmstan](https://github.com/mastodon/mastodon/pull/25945))
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Fix CSP headers being unintentionally wide ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/26105))
|
|
||||||
|
|
||||||
## [4.1.4] - 2023-07-07
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix branding:generate_app_icons failing because of disallowed ICO coder ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25794))
|
|
||||||
- Fix crash in admin interface when viewing a remote user with verified links ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25796))
|
|
||||||
- Fix processing of media files with unusual names ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25788))
|
|
||||||
|
|
||||||
## [4.1.3] - 2023-07-06
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Add fallback redirection when getting a webfinger query `LOCAL_DOMAIN@LOCAL_DOMAIN` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23600))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Change OpenGraph-based embeds to allow fullscreen ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25058))
|
|
||||||
- Change AccessTokensVacuum to also delete expired tokens ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24868))
|
|
||||||
- Change profile updates to be sent to recently-mentioned servers ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24852))
|
|
||||||
- Change automatic post deletion thresholds and load detection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24614))
|
|
||||||
- Change `/api/v1/statuses/:id/history` to always return at least one item ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25510))
|
|
||||||
- Change auto-linking to allow carets in URL query params ([renchap](https://github.com/mastodon/mastodon/pull/25216))
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
|
|
||||||
- Remove invalid `X-Frame-Options: ALLOWALL` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25070))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix wrong view being displayed when a webhook fails validation ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25464))
|
|
||||||
- Fix soft-deleted post cleanup scheduler overwhelming the streaming server ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25519))
|
|
||||||
- Fix incorrect pagination headers in `/api/v2/admin/accounts` ([danielmbrasil](https://github.com/mastodon/mastodon/pull/25477))
|
|
||||||
- Fix multiple inefficiencies in automatic post cleanup worker ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24607), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24785), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24840))
|
|
||||||
- Fix performance of streaming by parsing message JSON once ([ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25278), [ThisIsMissEm](https://github.com/mastodon/mastodon/pull/25361))
|
|
||||||
- Fix CSP headers when `S3_ALIAS_HOST` includes a path component ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25273))
|
|
||||||
- Fix `tootctl accounts approve --number N` not approving N earliest registrations ([danielmbrasil](https://github.com/mastodon/mastodon/pull/24605))
|
|
||||||
- Fix reports not being closed when performing batch suspensions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24988))
|
|
||||||
- Fix being able to vote on your own polls ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25015))
|
|
||||||
- Fix race condition when reblogging a status ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25016))
|
|
||||||
- Fix “Authorized applications” inefficiently and incorrectly getting last use date ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25060))
|
|
||||||
- Fix “Authorized applications” crashing when listing apps with certain admin API scopes ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25713))
|
|
||||||
- Fix multiple N+1s in ConversationsController ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25134), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25399), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/25499))
|
|
||||||
- Fix user archive takeouts when using OpenStack Swift ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24431))
|
|
||||||
- Fix searching for remote content by URL not working under certain conditions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25637))
|
|
||||||
- Fix inefficiencies in indexing content for search ([VyrCossont](https://github.com/mastodon/mastodon/pull/24285), [VyrCossont](https://github.com/mastodon/mastodon/pull/24342))
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Add finer permission requirements for managing webhooks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25463))
|
|
||||||
- Update dependencies
|
|
||||||
- Add hardening headers for user-uploaded files ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/25756))
|
|
||||||
- Fix verified links possibly hiding important parts of the URL (CVE-2023-36462)
|
|
||||||
- Fix timeout handling of outbound HTTP requests (CVE-2023-36461)
|
|
||||||
- Fix arbitrary file creation through media processing (CVE-2023-36460)
|
|
||||||
- Fix possible XSS in preview cards (CVE-2023-36459)
|
|
||||||
|
|
||||||
## [4.1.2] - 2023-04-04
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix crash in `tootctl` commands making use of parallelization when Elasticsearch is enabled ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24182), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/24377))
|
|
||||||
- Fix crash in `db:setup` when Elasticsearch is enabled ([rrgeorge](https://github.com/mastodon/mastodon/pull/24302))
|
|
||||||
- Fix user archive takeout when using OpenStack Swift or S3 providers with no ACL support ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24200))
|
|
||||||
- Fix invalid/expired invites being processed on sign-up ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24337))
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Update Ruby to 3.0.6 due to ReDoS vulnerabilities ([saizai](https://github.com/mastodon/mastodon/pull/24334))
|
|
||||||
- Fix unescaped user input in LDAP query ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24379))
|
|
||||||
|
|
||||||
## [4.1.1] - 2023-03-16
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Add redirection from paths with url-encoded `@` to their decoded form ([thijskh](https://github.com/mastodon/mastodon/pull/23593))
|
|
||||||
- Add `lang` attribute to native language names in language picker in Web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23749))
|
|
||||||
- Add headers to outgoing mails to avoid auto-replies ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23597))
|
|
||||||
- Add support for refreshing many accounts at once with `tootctl accounts refresh` ([9p4](https://github.com/mastodon/mastodon/pull/23304))
|
|
||||||
- Add confirmation modal when clicking to edit a post with a non-empty compose form ([PauloVilarinho](https://github.com/mastodon/mastodon/pull/23936))
|
|
||||||
- Add support for the HAproxy PROXY protocol through the `PROXY_PROTO_V1` environment variable ([CSDUMMI](https://github.com/mastodon/mastodon/pull/24064))
|
|
||||||
- Add `SENDFILE_HEADER` environment variable ([Gargron](https://github.com/mastodon/mastodon/pull/24123))
|
|
||||||
- Add cache headers to static files served through Rails ([Gargron](https://github.com/mastodon/mastodon/pull/24120))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Increase contrast of upload progress bar background ([toolmantim](https://github.com/mastodon/mastodon/pull/23836))
|
|
||||||
- Change post auto-deletion throttling constants to better scale with server size ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23320))
|
|
||||||
- Change order of bookmark and favourite sidebar entries in single-column UI for consistency ([TerryGarcia](https://github.com/mastodon/mastodon/pull/23701))
|
|
||||||
- Change `ActivityPub::DeliveryWorker` retries to be spread out more ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21956))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix “Remove all followers from the selected domains” also removing follows and notifications ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23805))
|
|
||||||
- Fix streaming metrics format ([emilweth](https://github.com/mastodon/mastodon/pull/23519), [emilweth](https://github.com/mastodon/mastodon/pull/23520))
|
|
||||||
- Fix case-sensitive check for previously used hashtags in hashtag autocompletion ([deanveloper](https://github.com/mastodon/mastodon/pull/23526))
|
|
||||||
- Fix focus point of already-attached media not saving after edit ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23566))
|
|
||||||
- Fix sidebar behavior in settings/admin UI on mobile ([wxt2005](https://github.com/mastodon/mastodon/pull/23764))
|
|
||||||
- Fix inefficiency when searching accounts per username in admin interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23801))
|
|
||||||
- Fix duplicate “Publish” button on mobile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23804))
|
|
||||||
- Fix server error when failing to follow back followers from `/relationships` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23787))
|
|
||||||
- Fix server error when attempting to display the edit history of a trendable post in the admin interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23574))
|
|
||||||
- Fix `tootctl accounts migrate` crashing because of a typo ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23567))
|
|
||||||
- Fix original account being unfollowed on migration before the follow request to the new account could be sent ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21957))
|
|
||||||
- Fix the “Back” button in column headers sometimes leaving Mastodon ([c960657](https://github.com/mastodon/mastodon/pull/23953))
|
|
||||||
- Fix pgBouncer resetting application name on every transaction ([Gargron](https://github.com/mastodon/mastodon/pull/23958))
|
|
||||||
- Fix unconfirmed accounts being counted as active users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23803))
|
|
||||||
- Fix `/api/v1/streaming` sub-paths not being redirected ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23988))
|
|
||||||
- Fix drag'n'drop upload area text that spans multiple lines not being centered ([vintprox](https://github.com/mastodon/mastodon/pull/24029))
|
|
||||||
- Fix sidekiq jobs not triggering Elasticsearch index updates ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24046))
|
|
||||||
- Fix tags being unnecessarily stripped from plain-text short site description ([c960657](https://github.com/mastodon/mastodon/pull/23975))
|
|
||||||
- Fix HTML entities not being un-escaped in extracted plain-text from remote posts ([c960657](https://github.com/mastodon/mastodon/pull/24019))
|
|
||||||
- Fix dashboard crash on ElasticSearch server error ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23751))
|
|
||||||
- Fix incorrect post links in strikes when the account is remote ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23611))
|
|
||||||
- Fix misleading error code when receiving invalid WebAuthn credentials ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23568))
|
|
||||||
- Fix duplicate mails being sent when the SMTP server is too slow to close the connection ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23750))
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Change user backups to use expiring URLs for download when possible ([Gargron](https://github.com/mastodon/mastodon/pull/24136))
|
|
||||||
- Add warning for object storage misconfiguration ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/24137))
|
|
||||||
|
|
||||||
## [4.1.0] - 2023-02-10
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- **Add support for importing/exporting server-wide domain blocks** ([enbylenore](https://github.com/mastodon/mastodon/pull/20597), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/21471), [dariusk](https://github.com/mastodon/mastodon/pull/22803), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/21470))
|
|
||||||
- **Add listing of followed hashtags** ([connorshea](https://github.com/mastodon/mastodon/pull/21773))
|
|
||||||
- **Add support for editing media description and focus point of already-sent posts** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20878))
|
|
||||||
- Previously, you could add and remove attachments, but not edit media description of already-attached media
|
|
||||||
- REST API changes:
|
|
||||||
- `PUT /api/v1/statuses/:id` now takes an extra `media_attributes[]` array parameter with the `id` of the updated media and their updated `description`, `focus`, and `thumbnail`
|
|
||||||
- **Add follow request banner on account header** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20785))
|
|
||||||
- REST API changes:
|
|
||||||
- `Relationship` entities have an extra `requested_by` boolean attribute representing whether the represented user has requested to follow you
|
|
||||||
- **Add confirmation screen when handling reports** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22375), [Gargron](https://github.com/mastodon/mastodon/pull/23156), [tribela](https://github.com/mastodon/mastodon/pull/23178))
|
|
||||||
- Add option to make the landing page be `/about` even when trends are enabled ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20808))
|
|
||||||
- Add `noindex` setting back to the admin interface ([prplecake](https://github.com/mastodon/mastodon/pull/22205))
|
|
||||||
- Add instance peers API endpoint toggle back to the admin interface ([dariusk](https://github.com/mastodon/mastodon/pull/22810))
|
|
||||||
- Add instance activity API endpoint toggle back to the admin interface ([dariusk](https://github.com/mastodon/mastodon/pull/22833))
|
|
||||||
- Add setting for status page URL ([Gargron](https://github.com/mastodon/mastodon/pull/23390), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23499))
|
|
||||||
- REST API changes:
|
|
||||||
- Add `configuration.urls.status` attribute to the object returned by `GET /api/v2/instance`
|
|
||||||
- Add `account.approved` webhook ([Saiv46](https://github.com/mastodon/mastodon/pull/22938))
|
|
||||||
- Add 12 hours option to polls ([Pleclown](https://github.com/mastodon/mastodon/pull/21131))
|
|
||||||
- Add dropdown menu item to open admin interface for remote domains ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21895))
|
|
||||||
- Add `--remove-headers`, `--prune-profiles` and `--include-follows` flags to `tootctl media remove` ([evanphilip](https://github.com/mastodon/mastodon/pull/22149))
|
|
||||||
- Add `--email` and `--dry-run` options to `tootctl accounts delete` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22328))
|
|
||||||
- Add `tootctl accounts migrate` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22330))
|
|
||||||
- Add `tootctl accounts prune` ([tribela](https://github.com/mastodon/mastodon/pull/18397))
|
|
||||||
- Add `tootctl domains purge` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22063))
|
|
||||||
- Add `SIDEKIQ_CONCURRENCY` environment variable ([muffinista](https://github.com/mastodon/mastodon/pull/19589))
|
|
||||||
- Add `DB_POOL` environment variable support for streaming server ([Gargron](https://github.com/mastodon/mastodon/pull/23470))
|
|
||||||
- Add `MIN_THREADS` environment variable to set minimum Puma threads ([jimeh](https://github.com/mastodon/mastodon/pull/21048))
|
|
||||||
- Add explanation text to log-in page ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20946))
|
|
||||||
- Add user profile OpenGraph tag on post pages ([bramus](https://github.com/mastodon/mastodon/pull/21423))
|
|
||||||
- Add maskable icon support for Android ([workeffortwaste](https://github.com/mastodon/mastodon/pull/20904))
|
|
||||||
- Add Belarusian to supported languages ([Mixaill](https://github.com/mastodon/mastodon/pull/22022))
|
|
||||||
- Add Western Frisian to supported languages ([ykzts](https://github.com/mastodon/mastodon/pull/18602))
|
|
||||||
- Add Montenegrin to the language picker ([ayefries](https://github.com/mastodon/mastodon/pull/21013))
|
|
||||||
- Add Southern Sami and Lule Sami to the language picker ([Jullan-M](https://github.com/mastodon/mastodon/pull/21262))
|
|
||||||
- Add logging for Rails cache timeouts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21667))
|
|
||||||
- Add color highlight for active hashtag “follow” button ([MFTabriz](https://github.com/mastodon/mastodon/pull/21629))
|
|
||||||
- Add brotli compression to `assets:precompile` ([Izorkin](https://github.com/mastodon/mastodon/pull/19025))
|
|
||||||
- Add “disabled” account filter to the `/admin/accounts` UI ([tribela](https://github.com/mastodon/mastodon/pull/21282))
|
|
||||||
- Add transparency to modal background for accessibility ([edent](https://github.com/mastodon/mastodon/pull/18081))
|
|
||||||
- Add `lang` attribute to image description textarea and poll option field ([c960657](https://github.com/mastodon/mastodon/pull/23293))
|
|
||||||
- Add `spellcheck` attribute to Content Warning and poll option input fields ([c960657](https://github.com/mastodon/mastodon/pull/23395))
|
|
||||||
- Add `title` attribute to video elements in media attachments ([bramus](https://github.com/mastodon/mastodon/pull/21420))
|
|
||||||
- Add left and right margins to emojis ([dsblank](https://github.com/mastodon/mastodon/pull/20464))
|
|
||||||
- Add `roles` attribute to `Account` entities in REST API ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23255), [tribela](https://github.com/mastodon/mastodon/pull/23428))
|
|
||||||
- Add `reading:autoplay:gifs` to `/api/v1/preferences` ([j-f1](https://github.com/mastodon/mastodon/pull/22706))
|
|
||||||
- Add `hide_collections` parameter to `/api/v1/accounts/credentials` ([CarlSchwan](https://github.com/mastodon/mastodon/pull/22790))
|
|
||||||
- Add `policy` attribute to web push subscription objects in REST API at `/api/v1/push/subscriptions` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23210))
|
|
||||||
- Add metrics endpoint to streaming API ([Gargron](https://github.com/mastodon/mastodon/pull/23388), [Gargron](https://github.com/mastodon/mastodon/pull/23469))
|
|
||||||
- Add more specific error messages to HTTP signature verification ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21617))
|
|
||||||
- Add Storj DCS to cloud object storage options in the `mastodon:setup` rake task ([jtolio](https://github.com/mastodon/mastodon/pull/21929))
|
|
||||||
- Add checkmark symbol in the checkbox for sensitive media ([sidp](https://github.com/mastodon/mastodon/pull/22795))
|
|
||||||
- Add missing accessibility attributes to logout link in modals ([kytta](https://github.com/mastodon/mastodon/pull/22549))
|
|
||||||
- Add missing accessibility attributes to “Hide image” button in `MediaGallery` ([hs4man21](https://github.com/mastodon/mastodon/pull/22513))
|
|
||||||
- Add missing accessibility attributes to hide content warning field when disabled ([hs4man21](https://github.com/mastodon/mastodon/pull/22568))
|
|
||||||
- Add `aria-hidden` to footer circle dividers to improve accessibility ([hs4man21](https://github.com/mastodon/mastodon/pull/22576))
|
|
||||||
- Add `lang` attribute to compose form inputs ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23240))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- **Ensure exact match is the first result in hashtag searches** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21315))
|
|
||||||
- Change account search to return followed accounts first ([dariusk](https://github.com/mastodon/mastodon/pull/22956))
|
|
||||||
- Change batch account suspension to create a strike ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20897))
|
|
||||||
- Change default reply language to match the default language when replying to a translated post ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22272))
|
|
||||||
- Change misleading wording about waitlists ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20850))
|
|
||||||
- Increase width of the unread notification border ([connorshea](https://github.com/mastodon/mastodon/pull/21692))
|
|
||||||
- Change new post notification button on profiles to make it more apparent when it is enabled ([tribela](https://github.com/mastodon/mastodon/pull/22541))
|
|
||||||
- Change trending tags admin interface to always show batch action controls ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23013))
|
|
||||||
- Change wording of some OAuth scope descriptions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22491))
|
|
||||||
- Change wording of admin report handling actions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18388))
|
|
||||||
- Change confirm prompts for relationships management ([tribela](https://github.com/mastodon/mastodon/pull/19411))
|
|
||||||
- Change language surrounding disability in prompts for media descriptions ([hs4man21](https://github.com/mastodon/mastodon/pull/20923))
|
|
||||||
- Change confusing wording in the sign in banner ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22490))
|
|
||||||
- Change `POST /settings/applications/:id` to regenerate token on scopes change ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23359))
|
|
||||||
- Change account moderation notes to make links clickable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22553))
|
|
||||||
- Change link previews for statuses to never use avatar as fallback ([Gargron](https://github.com/mastodon/mastodon/pull/23376))
|
|
||||||
- Change email address input to be read-only for logged-in users when requesting a new confirmation e-mail ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23247))
|
|
||||||
- Change notifications per page from 15 to 40 in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/23348))
|
|
||||||
- Change number of stored items in home feed from 400 to 800 ([Gargron](https://github.com/mastodon/mastodon/pull/23349))
|
|
||||||
- Change API rate limits from 300/5min per user to 1500/5min per user, 300/5min per app ([Gargron](https://github.com/mastodon/mastodon/pull/23347))
|
|
||||||
- Save avatar or header correctly even if the other one fails ([tribela](https://github.com/mastodon/mastodon/pull/18465))
|
|
||||||
- Change `referrer-policy` to `same-origin` application-wide ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23014), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23037))
|
|
||||||
- Add 'private' to `Cache-Control`, match Rails expectations ([daxtens](https://github.com/mastodon/mastodon/pull/20608))
|
|
||||||
- Make the button that expands the compose form differentiable from the button that publishes a post ([Tak](https://github.com/mastodon/mastodon/pull/20864))
|
|
||||||
- Change automatic post deletion configuration to be accessible to moved users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20774))
|
|
||||||
- Make tag following idempotent ([trwnh](https://github.com/mastodon/mastodon/pull/20860), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/21285))
|
|
||||||
- Use buildx functions for faster builds ([inductor](https://github.com/mastodon/mastodon/pull/20692))
|
|
||||||
- Split off Dockerfile components for faster builds ([moritzheiber](https://github.com/mastodon/mastodon/pull/20933), [ineffyble](https://github.com/mastodon/mastodon/pull/20948), [BtbN](https://github.com/mastodon/mastodon/pull/21028))
|
|
||||||
- Change last occurrence of “silence” to “limit” in UI text ([cincodenada](https://github.com/mastodon/mastodon/pull/20637))
|
|
||||||
- Change “hide toot” to “hide post” ([seanthegeek](https://github.com/mastodon/mastodon/pull/22385))
|
|
||||||
- Don't allow URLs that contain non-normalized paths to be verified ([dgl](https://github.com/mastodon/mastodon/pull/20999))
|
|
||||||
- Change the “Trending now” header to be a link to the Explore page ([connorshea](https://github.com/mastodon/mastodon/pull/21759))
|
|
||||||
- Change PostgreSQL connection timeout from 2 minutes to 15 seconds ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21790))
|
|
||||||
- Make handle more easily selectable on profile page ([cadars](https://github.com/mastodon/mastodon/pull/21479))
|
|
||||||
- Allow admins to refresh remotely-suspended accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22327))
|
|
||||||
- Change dropdown menu to contain “Copy link to post” even for non-public posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21316))
|
|
||||||
- Allow adding relays in secure mode and limited federation mode ([ineffyble](https://github.com/mastodon/mastodon/pull/22324))
|
|
||||||
- Change timestamps to be displayed using the user's timezone throughout the moderation interface ([FrancisMurillo](https://github.com/mastodon/mastodon/pull/21878), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/22555))
|
|
||||||
- Change CSP directives on API to be tight and concise ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20960))
|
|
||||||
- Change web UI to not autofocus the compose form ([raboof](https://github.com/mastodon/mastodon/pull/16517), [Akkiesoft](https://github.com/mastodon/mastodon/pull/23094))
|
|
||||||
- Change idempotency key handling for posting when database access is slow ([lambda](https://github.com/mastodon/mastodon/pull/21840))
|
|
||||||
- Change remote media files to be downloaded outside of transactions ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21796))
|
|
||||||
- Improve contrast of charts in “poll has ended” notifications ([j-f1](https://github.com/mastodon/mastodon/pull/22575))
|
|
||||||
- Change OEmbed detection and validation to be somewhat more lenient ([ineffyble](https://github.com/mastodon/mastodon/pull/22533))
|
|
||||||
- Widen ElasticSearch version detection to not display a warning for OpenSearch ([VyrCossont](https://github.com/mastodon/mastodon/pull/22422), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23064))
|
|
||||||
- Change link verification to allow pages larger than 1MB as long as the link is in the first 1MB ([untitaker](https://github.com/mastodon/mastodon/pull/22879))
|
|
||||||
- Update default Node.js version to Node.js 16 ([ineffyble](https://github.com/mastodon/mastodon/pull/22223), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/22342))
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
|
|
||||||
- Officially remove support for Ruby 2.6 ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21477))
|
|
||||||
- Remove `object-fit` polyfill used for old versions of Microsoft Edge ([shuuji3](https://github.com/mastodon/mastodon/pull/22693))
|
|
||||||
- Remove `intersection-observer` polyfill for old Safari support ([shuuji3](https://github.com/mastodon/mastodon/pull/23284))
|
|
||||||
- Remove empty `title` tag from mailer layout ([nametoolong](https://github.com/mastodon/mastodon/pull/23078))
|
|
||||||
- Remove post count and last posts from ActivityPub representation of hashtag collections ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23460))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- **Fix changing domain block severity not undoing individual account effects** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22135))
|
|
||||||
- Fix suspension worker crashing on S3-compatible setups without ACL support ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22487))
|
|
||||||
- Fix possible race conditions when suspending/unsuspending accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22363))
|
|
||||||
- Fix being stuck in edit mode when deleting the edited posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22126))
|
|
||||||
- Fix attached media uploads not being cleared when replying to a post ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23504))
|
|
||||||
- Fix filters not being applied to some notification types ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23211))
|
|
||||||
- Fix incorrect link in push notifications for some event types ([elizabeth-dev](https://github.com/mastodon/mastodon/pull/23286))
|
|
||||||
- Fix some performance issues with `/admin/instances` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21907))
|
|
||||||
- Fix some pre-4.0 admin audit logs ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22091))
|
|
||||||
- Fix moderation audit log items for warnings having incorrect links ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23242))
|
|
||||||
- Fix account activation being sometimes triggered before email confirmation ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23245))
|
|
||||||
- Fix missing OAuth scopes for admin APIs ([trwnh](https://github.com/mastodon/mastodon/pull/20918), [trwnh](https://github.com/mastodon/mastodon/pull/20979))
|
|
||||||
- Fix voter count not being cleared when a poll is reset ([afontenot](https://github.com/mastodon/mastodon/pull/21700))
|
|
||||||
- Fix attachments of edited posts not being fetched ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21565))
|
|
||||||
- Fix irreversible and whole_word parameters handling in `/api/v1/filters` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21988))
|
|
||||||
- Fix 500 error when marking posts as sensitive while some of them are deleted ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22134))
|
|
||||||
- Fix expanded posts not always being scrolled into view ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21797))
|
|
||||||
- Fix not being able to scroll the remote interaction modal on small screens ([xendke](https://github.com/mastodon/mastodon/pull/21763))
|
|
||||||
- Fix not being able to scroll in post history modal ([cadars](https://github.com/mastodon/mastodon/pull/23396))
|
|
||||||
- Fix audio player volume control on Safari ([minacle](https://github.com/mastodon/mastodon/pull/23187))
|
|
||||||
- Fix disappearing “Explore” tabs on Safari ([nyura](https://github.com/mastodon/mastodon/pull/20917), [ykzts](https://github.com/mastodon/mastodon/pull/20982))
|
|
||||||
- Fix wrong padding in RTL layout ([Gargron](https://github.com/mastodon/mastodon/pull/23157))
|
|
||||||
- Fix drag & drop upload area display in single-column mode ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23217))
|
|
||||||
- Fix being unable to get a single EmailDomainBlock from the admin API ([trwnh](https://github.com/mastodon/mastodon/pull/20846))
|
|
||||||
- Fix admin-set follow recommandations being case-sensitive ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23500))
|
|
||||||
- Fix unserialized `role` on account entities in admin API ([Gargron](https://github.com/mastodon/mastodon/pull/23290))
|
|
||||||
- Fix pagination of followed tags ([trwnh](https://github.com/mastodon/mastodon/pull/20861))
|
|
||||||
- Fix dropdown menu positions when scrolling ([sidp](https://github.com/mastodon/mastodon/pull/22916), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23062))
|
|
||||||
- Fix email with empty domain name labels passing validation ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23246))
|
|
||||||
- Fix mysterious registration failure when “Require a reason to join” is set with open registrations ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22127))
|
|
||||||
- Fix attachment rendering of edited posts in OpenGraph ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22270))
|
|
||||||
- Fix invalid/empty RSS feed link on account pages ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20772))
|
|
||||||
- Fix error in `VerifyLinkService` when processing links with no href ([joshuap](https://github.com/mastodon/mastodon/pull/20741))
|
|
||||||
- Fix error in `VerifyLinkService` when processing links with invalid URLs ([untitaker](https://github.com/mastodon/mastodon/pull/23204))
|
|
||||||
- Fix media uploads with FFmpeg 5 ([dead10ck](https://github.com/mastodon/mastodon/pull/21191))
|
|
||||||
- Fix sensitive flag not being set when replying to a post with a content warning under certain conditions ([kedamaDQ](https://github.com/mastodon/mastodon/pull/21724))
|
|
||||||
- Fix misleading message briefly showing up when loading follow requests under some conditions ([c960657](https://github.com/mastodon/mastodon/pull/23386))
|
|
||||||
- Fix “Share @:user's profile” profile menu item not working ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21490))
|
|
||||||
- Fix crash and incorrect behavior in `tootctl domains crawl` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19004))
|
|
||||||
- Fix autoplay on iOS ([jamesadney](https://github.com/mastodon/mastodon/pull/21422))
|
|
||||||
- Fix user clean-up scheduler crash when an unconfirmed account has a moderation note ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23318))
|
|
||||||
- Fix spaces not being stripped in admin account search ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21324))
|
|
||||||
- Fix spaces not being stripped when adding relays ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22655))
|
|
||||||
- Fix infinite loading spinner instead of soft 404 for non-existing remote accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21303))
|
|
||||||
- Fix minor visual issue with the top border of verified account fields ([j-f1](https://github.com/mastodon/mastodon/pull/22006))
|
|
||||||
- Fix pending account approval and rejection not being recorded in the admin audit log ([FrancisMurillo](https://github.com/mastodon/mastodon/pull/22088))
|
|
||||||
- Fix “Sign up” button with closed registrations not opening modal on mobile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22060))
|
|
||||||
- Fix UI header overflowing on mobile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21783))
|
|
||||||
- Fix 500 error when trying to migrate to an invalid address ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21462))
|
|
||||||
- Fix crash when trying to fetch unobtainable avatar of user using external authentication ([lochiiconnectivity](https://github.com/mastodon/mastodon/pull/22462))
|
|
||||||
- Fix processing error on incoming malformed JSON-LD under some situations ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23416))
|
|
||||||
- Fix potential duplicate posts in Explore tab ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22121))
|
|
||||||
- Fix deprecation warning in `tootctl accounts rotate` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22120))
|
|
||||||
- Fix styling of featured tags in light theme ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23252))
|
|
||||||
- Fix missing style in warning and strike cards ([AtelierSnek](https://github.com/mastodon/mastodon/pull/22177), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/22302))
|
|
||||||
- Fix wasteful request to `/api/v1/custom_emojis` when not logged in ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22326))
|
|
||||||
- Fix replies sometimes being delivered to user-blocked domains ([tribela](https://github.com/mastodon/mastodon/pull/22117))
|
|
||||||
- Fix admin dashboard crash when using some ElasticSearch replacements ([cortices](https://github.com/mastodon/mastodon/pull/21006))
|
|
||||||
- Fix profile avatar being slightly offset into left border ([RiedleroD](https://github.com/mastodon/mastodon/pull/20994))
|
|
||||||
- Fix N+1 queries in `NotificationsController` ([nametoolong](https://github.com/mastodon/mastodon/pull/21202))
|
|
||||||
- Fix being unable to react to announcements with the keycap number sign emoji ([kescherCode](https://github.com/mastodon/mastodon/pull/22231))
|
|
||||||
- Fix height computation of post embeds ([hodgesmr](https://github.com/mastodon/mastodon/pull/22141))
|
|
||||||
- Fix accessibility issue of the search bar due to hidden placeholder ([alexstine](https://github.com/mastodon/mastodon/pull/21275))
|
|
||||||
- Fix layout change handler not being removed due to a typo ([nschonni](https://github.com/mastodon/mastodon/pull/21829))
|
|
||||||
- Fix typo in the default `S3_HOSTNAME` used in the `mastodon:setup` rake task ([danp](https://github.com/mastodon/mastodon/pull/19932))
|
|
||||||
- Fix the top action bar appearing in the multi-column layout ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20943))
|
|
||||||
- Fix inability to use local LibreTranslate without setting `ALLOWED_PRIVATE_ADDRESSES` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21926))
|
|
||||||
- Fix punycoded local domains not being prettified in initial state ([Tritlo](https://github.com/mastodon/mastodon/pull/21440))
|
|
||||||
- Fix CSP violation warning by removing inline CSS from SVG logo ([luxiaba](https://github.com/mastodon/mastodon/pull/20814))
|
|
||||||
- Fix margin for search field on medium window size ([minacle](https://github.com/mastodon/mastodon/pull/21606))
|
|
||||||
- Fix search popout scrolling with the page in single-column mode ([rgroothuijsen](https://github.com/mastodon/mastodon/pull/16463))
|
|
||||||
- Fix minor post cache hydration discrepancy ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19879))
|
|
||||||
- Fix `・` detection in hashtags ([parthoghosh24](https://github.com/mastodon/mastodon/pull/22888))
|
|
||||||
- Fix hashtag follows bypassing user blocks ([tribela](https://github.com/mastodon/mastodon/pull/22849))
|
|
||||||
- Fix moved accounts being incorrectly redirected to account settings when trying to view a remote profile ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22497))
|
|
||||||
- Fix site upload validations ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22479))
|
|
||||||
- Fix “Add new domain block” button using last submitted search value instead of the current one ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22485))
|
|
||||||
- Fix misleading hashtag warning when posting with “Followers only” or “Mentioned people only” visibility ([n0toose](https://github.com/mastodon/mastodon/pull/22827))
|
|
||||||
- Fix embedded posts with videos grabbing focus ([Akkiesoft](https://github.com/mastodon/mastodon/pull/22778))
|
|
||||||
- Fix `$` not being escaped in `.env.production` files generated by the `mastodon:setup` rake task ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/23012), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/23072))
|
|
||||||
- Fix sanitizer parsing link text as HTML when stripping unsupported links ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22558))
|
|
||||||
- Fix `scheduled_at` input not using `datetime-local` when editing announcements ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/21896))
|
|
||||||
- Fix REST API serializer for `Account` not including `moved` when the moved account has itself moved ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22483))
|
|
||||||
- Fix `/api/v1/admin/trends/tags` using wrong serializer ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18943))
|
|
||||||
- Fix situations in which instance actor can be set to a Mastodon-incompatible name ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22307))
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Add `form-action` CSP directive ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20781), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20958), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20962))
|
|
||||||
- Fix unbounded recursion in account discovery ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/22025))
|
|
||||||
- Revoke all authorized applications on password reset ([FrancisMurillo](https://github.com/mastodon/mastodon/pull/21325))
|
|
||||||
- Fix unbounded recursion in post discovery ([ClearlyClaire,nametoolong](https://github.com/mastodon/mastodon/pull/23506))
|
|
||||||
|
|
||||||
## [4.0.2] - 2022-11-15
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix wrong color on mentions hidden behind content warning in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20724))
|
|
||||||
- Fix filters from other users being used in the streaming service ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20719))
|
|
||||||
- Fix `unsafe-eval` being used when `wasm-unsafe-eval` is enough in Content Security Policy ([Gargron](https://github.com/mastodon/mastodon/pull/20729), [prplecake](https://github.com/mastodon/mastodon/pull/20606))
|
|
||||||
|
|
||||||
## [4.0.1] - 2022-11-14
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix nodes order being sometimes mangled when rewriting emoji ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20677))
|
|
||||||
|
|
||||||
## [4.0.0] - 2022-11-14
|
|
||||||
|
|
||||||
Some of the features in this release have been funded through the [NGI0 Discovery](https://nlnet.nl/discovery) Fund, a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322.
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Add ability to filter followed accounts' posts by language ([Gargron](https://github.com/mastodon/mastodon/pull/19095), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19268))
|
|
||||||
- **Add ability to follow hashtags** ([Gargron](https://github.com/mastodon/mastodon/pull/18809), [Gargron](https://github.com/mastodon/mastodon/pull/18862), [Gargron](https://github.com/mastodon/mastodon/pull/19472), [noellabo](https://github.com/mastodon/mastodon/pull/18924))
|
|
||||||
- Add ability to filter individual posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18945))
|
|
||||||
- **Add ability to translate posts** ([Gargron](https://github.com/mastodon/mastodon/pull/19218), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19433), [Gargron](https://github.com/mastodon/mastodon/pull/19453), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19434), [Gargron](https://github.com/mastodon/mastodon/pull/19388), [ykzts](https://github.com/mastodon/mastodon/pull/19244), [Gargron](https://github.com/mastodon/mastodon/pull/19245))
|
|
||||||
- Add featured tags to web UI ([noellabo](https://github.com/mastodon/mastodon/pull/19408), [noellabo](https://github.com/mastodon/mastodon/pull/19380), [noellabo](https://github.com/mastodon/mastodon/pull/19358), [noellabo](https://github.com/mastodon/mastodon/pull/19409), [Gargron](https://github.com/mastodon/mastodon/pull/19382), [ykzts](https://github.com/mastodon/mastodon/pull/19418), [noellabo](https://github.com/mastodon/mastodon/pull/19403), [noellabo](https://github.com/mastodon/mastodon/pull/19404), [Gargron](https://github.com/mastodon/mastodon/pull/19398), [Gargron](https://github.com/mastodon/mastodon/pull/19712), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20018))
|
|
||||||
- **Add support for language preferences for trending statuses and links** ([Gargron](https://github.com/mastodon/mastodon/pull/18288), [Gargron](https://github.com/mastodon/mastodon/pull/19349), [ykzts](https://github.com/mastodon/mastodon/pull/19335))
|
|
||||||
- Previously, you could only see trends in your current language
|
|
||||||
- For less popular languages, that meant empty trends
|
|
||||||
- Now, trends in your preferred languages' are shown on top, with others beneath
|
|
||||||
- Add server rules to sign-up flow ([Gargron](https://github.com/mastodon/mastodon/pull/19296))
|
|
||||||
- Add privacy icons to report modal in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19190))
|
|
||||||
- Add `noopener` to links to remote profiles in web UI ([shleeable](https://github.com/mastodon/mastodon/pull/19014))
|
|
||||||
- Add option to open original page in dropdowns of remote content in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20299))
|
|
||||||
- Add warning for sensitive audio posts in web UI ([rgroothuijsen](https://github.com/mastodon/mastodon/pull/17885))
|
|
||||||
- Add language attribute to posts in web UI ([tribela](https://github.com/mastodon/mastodon/pull/18544))
|
|
||||||
- Add support for uploading WebP files ([Saiv46](https://github.com/mastodon/mastodon/pull/18506))
|
|
||||||
- Add support for uploading `audio/vnd.wave` files ([tribela](https://github.com/mastodon/mastodon/pull/18737))
|
|
||||||
- Add support for uploading AVIF files ([txt-file](https://github.com/mastodon/mastodon/pull/19647))
|
|
||||||
- Add support for uploading HEIC files ([Gargron](https://github.com/mastodon/mastodon/pull/19618))
|
|
||||||
- Add more debug information when processing remote accounts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/15605), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19209))
|
|
||||||
- **Add retention policy for cached content and media** ([Gargron](https://github.com/mastodon/mastodon/pull/19232), [zunda](https://github.com/mastodon/mastodon/pull/19478), [Gargron](https://github.com/mastodon/mastodon/pull/19458), [Gargron](https://github.com/mastodon/mastodon/pull/19248))
|
|
||||||
- Set for how long remote posts or media should be cached on your server
|
|
||||||
- Hands-off alternative to `tootctl` commands
|
|
||||||
- **Add customizable user roles** ([Gargron](https://github.com/mastodon/mastodon/pull/18641), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18812), [Gargron](https://github.com/mastodon/mastodon/pull/19040), [tribela](https://github.com/mastodon/mastodon/pull/18825), [tribela](https://github.com/mastodon/mastodon/pull/18826), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18776), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18777), [unextro](https://github.com/mastodon/mastodon/pull/18786), [tribela](https://github.com/mastodon/mastodon/pull/18824), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19436))
|
|
||||||
- Previously, there were 3 hard-coded roles, user, moderator, and admin
|
|
||||||
- Create your own roles and decide which permissions they should have
|
|
||||||
- Add notifications for new reports ([Gargron](https://github.com/mastodon/mastodon/pull/18697), [Gargron](https://github.com/mastodon/mastodon/pull/19475))
|
|
||||||
- Add ability to select all accounts matching search for batch actions in admin UI ([Gargron](https://github.com/mastodon/mastodon/pull/19053), [Gargron](https://github.com/mastodon/mastodon/pull/19054))
|
|
||||||
- Add ability to view previous edits of a status in admin UI ([Gargron](https://github.com/mastodon/mastodon/pull/19462))
|
|
||||||
- Add ability to block sign-ups from IP ([Gargron](https://github.com/mastodon/mastodon/pull/19037))
|
|
||||||
- **Add webhooks to admin UI** ([Gargron](https://github.com/mastodon/mastodon/pull/18510))
|
|
||||||
- Add admin API for managing domain allows ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18668))
|
|
||||||
- Add admin API for managing domain blocks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18247))
|
|
||||||
- Add admin API for managing e-mail domain blocks ([Gargron](https://github.com/mastodon/mastodon/pull/19066))
|
|
||||||
- Add admin API for managing canonical e-mail blocks ([Gargron](https://github.com/mastodon/mastodon/pull/19067))
|
|
||||||
- Add admin API for managing IP blocks ([Gargron](https://github.com/mastodon/mastodon/pull/19065), [trwnh](https://github.com/mastodon/mastodon/pull/20207))
|
|
||||||
- Add `sensitized` attribute to accounts in admin REST API ([trwnh](https://github.com/mastodon/mastodon/pull/20094))
|
|
||||||
- Add `services` and `metadata` to the NodeInfo endpoint ([MFTabriz](https://github.com/mastodon/mastodon/pull/18563))
|
|
||||||
- Add `--remove-role` option to `tootctl accounts modify` ([Gargron](https://github.com/mastodon/mastodon/pull/19477))
|
|
||||||
- Add `--days` option to `tootctl media refresh` ([tribela](https://github.com/mastodon/mastodon/pull/18425))
|
|
||||||
- Add `EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION` environment variable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18642))
|
|
||||||
- Add `IP_RETENTION_PERIOD` and `SESSION_RETENTION_PERIOD` environment variables ([kescherCode](https://github.com/mastodon/mastodon/pull/18757))
|
|
||||||
- Add `http_hidden_proxy` environment variable ([tribela](https://github.com/mastodon/mastodon/pull/18427))
|
|
||||||
- Add `ENABLE_STARTTLS` environment variable ([erbridge](https://github.com/mastodon/mastodon/pull/20321))
|
|
||||||
- Add caching for payload serialization during fan-out ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19637), [Gargron](https://github.com/mastodon/mastodon/pull/19642), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19746), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19747), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19963))
|
|
||||||
- Add assets from Twemoji 14.0 ([Gargron](https://github.com/mastodon/mastodon/pull/19733))
|
|
||||||
- Add reputation and followers score boost to SQL-only account search ([Gargron](https://github.com/mastodon/mastodon/pull/19251))
|
|
||||||
- Add Scots, Balaibalan, Láadan, Lingua Franca Nova, Lojban, Toki Pona to languages list ([VyrCossont](https://github.com/mastodon/mastodon/pull/20168))
|
|
||||||
- Set autocomplete hints for e-mail, password and OTP fields ([rcombs](https://github.com/mastodon/mastodon/pull/19833), [offbyone](https://github.com/mastodon/mastodon/pull/19946), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20071))
|
|
||||||
- Add support for DigitalOcean Spaces in setup wizard ([v-aisac](https://github.com/mastodon/mastodon/pull/20573))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- **Change brand color and logotypes** ([Gargron](https://github.com/mastodon/mastodon/pull/18592), [Gargron](https://github.com/mastodon/mastodon/pull/18639), [Gargron](https://github.com/mastodon/mastodon/pull/18691), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18634), [Gargron](https://github.com/mastodon/mastodon/pull/19254), [mayaeh](https://github.com/mastodon/mastodon/pull/18710))
|
|
||||||
- **Change post editing to be enabled in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/19103))
|
|
||||||
- **Change web UI to work for logged-out users** ([Gargron](https://github.com/mastodon/mastodon/pull/18961), [Gargron](https://github.com/mastodon/mastodon/pull/19250), [Gargron](https://github.com/mastodon/mastodon/pull/19294), [Gargron](https://github.com/mastodon/mastodon/pull/19306), [Gargron](https://github.com/mastodon/mastodon/pull/19315), [ykzts](https://github.com/mastodon/mastodon/pull/19322), [Gargron](https://github.com/mastodon/mastodon/pull/19412), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19437), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19415), [Gargron](https://github.com/mastodon/mastodon/pull/19348), [Gargron](https://github.com/mastodon/mastodon/pull/19295), [Gargron](https://github.com/mastodon/mastodon/pull/19422), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19414), [Gargron](https://github.com/mastodon/mastodon/pull/19319), [Gargron](https://github.com/mastodon/mastodon/pull/19345), [Gargron](https://github.com/mastodon/mastodon/pull/19310), [Gargron](https://github.com/mastodon/mastodon/pull/19301), [Gargron](https://github.com/mastodon/mastodon/pull/19423), [ykzts](https://github.com/mastodon/mastodon/pull/19471), [ykzts](https://github.com/mastodon/mastodon/pull/19333), [ykzts](https://github.com/mastodon/mastodon/pull/19337), [ykzts](https://github.com/mastodon/mastodon/pull/19272), [ykzts](https://github.com/mastodon/mastodon/pull/19468), [Gargron](https://github.com/mastodon/mastodon/pull/19466), [Gargron](https://github.com/mastodon/mastodon/pull/19457), [Gargron](https://github.com/mastodon/mastodon/pull/19426), [Gargron](https://github.com/mastodon/mastodon/pull/19427), [Gargron](https://github.com/mastodon/mastodon/pull/19421), [Gargron](https://github.com/mastodon/mastodon/pull/19417), [Gargron](https://github.com/mastodon/mastodon/pull/19413), [Gargron](https://github.com/mastodon/mastodon/pull/19397), [Gargron](https://github.com/mastodon/mastodon/pull/19387), [Gargron](https://github.com/mastodon/mastodon/pull/19396), [Gargron](https://github.com/mastodon/mastodon/pull/19385), [ykzts](https://github.com/mastodon/mastodon/pull/19334), [ykzts](https://github.com/mastodon/mastodon/pull/19329), [Gargron](https://github.com/mastodon/mastodon/pull/19324), [Gargron](https://github.com/mastodon/mastodon/pull/19318), [Gargron](https://github.com/mastodon/mastodon/pull/19316), [Gargron](https://github.com/mastodon/mastodon/pull/19263), [trwnh](https://github.com/mastodon/mastodon/pull/19305), [ykzts](https://github.com/mastodon/mastodon/pull/19273), [Gargron](https://github.com/mastodon/mastodon/pull/19801), [Gargron](https://github.com/mastodon/mastodon/pull/19790), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19773), [Gargron](https://github.com/mastodon/mastodon/pull/19798), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19724), [Gargron](https://github.com/mastodon/mastodon/pull/19709), [Gargron](https://github.com/mastodon/mastodon/pull/19514), [Gargron](https://github.com/mastodon/mastodon/pull/19562), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19981), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19978), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20148), [Gargron](https://github.com/mastodon/mastodon/pull/20302), [cutls](https://github.com/mastodon/mastodon/pull/20400))
|
|
||||||
- The web app can now be accessed without being logged in
|
|
||||||
- No more `/web` prefix on web app paths
|
|
||||||
- Profiles, posts, and other public pages now use the same interface for logged in and logged out users
|
|
||||||
- The web app displays a server information banner
|
|
||||||
- Pop-up windows for remote interaction have been replaced with a modal window
|
|
||||||
- No need to type in your username for remote interaction, copy-paste-to-search method explained
|
|
||||||
- Various hints throughout the app explain what the different timelines are
|
|
||||||
- New about page design
|
|
||||||
- New privacy policy page design shows when the policy was last updated
|
|
||||||
- All sections of the web app now have appropriate window titles
|
|
||||||
- The layout of the interface has been streamlined between different screen sizes
|
|
||||||
- Posts now use more horizontal space
|
|
||||||
- Change label of publish button to be "Publish" again in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/18583))
|
|
||||||
- Change language to be carried over on reply in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18557))
|
|
||||||
- Change "Unfollow" to "Cancel follow request" when request still pending in web UI ([prplecake](https://github.com/mastodon/mastodon/pull/19363))
|
|
||||||
- **Change post filtering system** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18058), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19050), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18894), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19051), [noellabo](https://github.com/mastodon/mastodon/pull/18923), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18956), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18744), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19878), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20567))
|
|
||||||
- Filtered keywords and phrases can now be grouped into named categories
|
|
||||||
- Filtered posts show which exact filter was hit
|
|
||||||
- Individual posts can be added to a filter
|
|
||||||
- You can peek inside filtered posts anyway
|
|
||||||
- Change path of privacy policy page from `/terms` to `/privacy-policy` ([Gargron](https://github.com/mastodon/mastodon/pull/19249))
|
|
||||||
- Change how hashtags are normalized ([Gargron](https://github.com/mastodon/mastodon/pull/18795), [Gargron](https://github.com/mastodon/mastodon/pull/18863), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18854))
|
|
||||||
- Change settings area to be separated into categories in admin UI ([Gargron](https://github.com/mastodon/mastodon/pull/19407), [Gargron](https://github.com/mastodon/mastodon/pull/19533))
|
|
||||||
- Change "No accounts selected" errors to use the appropriate noun in admin UI ([prplecake](https://github.com/mastodon/mastodon/pull/19356))
|
|
||||||
- Change e-mail domain blocks to match subdomains of blocked domains ([Gargron](https://github.com/mastodon/mastodon/pull/18979))
|
|
||||||
- Change custom emoji file size limit from 50 KB to 256 KB ([Gargron](https://github.com/mastodon/mastodon/pull/18788))
|
|
||||||
- Change "Allow trends without prior review" setting to also work for trending posts ([Gargron](https://github.com/mastodon/mastodon/pull/17977))
|
|
||||||
- Change admin announcements form to use single inputs for date and time in admin UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18321))
|
|
||||||
- Change search API to be accessible without being logged in ([Gargron](https://github.com/mastodon/mastodon/pull/18963), [Gargron](https://github.com/mastodon/mastodon/pull/19326))
|
|
||||||
- Change following and followers API to be accessible without being logged in ([Gargron](https://github.com/mastodon/mastodon/pull/18964))
|
|
||||||
- Change `AUTHORIZED_FETCH` to not block unauthenticated REST API access ([Gargron](https://github.com/mastodon/mastodon/pull/19803))
|
|
||||||
- Change Helm configuration ([deepy](https://github.com/mastodon/mastodon/pull/18997), [jgsmith](https://github.com/mastodon/mastodon/pull/18415), [deepy](https://github.com/mastodon/mastodon/pull/18941))
|
|
||||||
- Change mentions of blocked users to not be processed ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19725))
|
|
||||||
- Change max. thumbnail dimensions to 640x360px (360p) ([Gargron](https://github.com/mastodon/mastodon/pull/19619))
|
|
||||||
- Change post-processing to be deferred only for large media types ([Gargron](https://github.com/mastodon/mastodon/pull/19617))
|
|
||||||
- Change link verification to only work for https links without unicode ([Gargron](https://github.com/mastodon/mastodon/pull/20304), [Gargron](https://github.com/mastodon/mastodon/pull/20295))
|
|
||||||
- Change account deletion requests to spread out over time ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20222))
|
|
||||||
- Change larger reblogs/favourites numbers to be shortened in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20303))
|
|
||||||
- Change incoming activity processing to happen in `ingress` queue ([Gargron](https://github.com/mastodon/mastodon/pull/20264))
|
|
||||||
- Change notifications to not link show preview cards in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20335))
|
|
||||||
- Change amount of replies returned for logged out users in REST API ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20355))
|
|
||||||
- Change in-app links to keep you in-app in web UI ([trwnh](https://github.com/mastodon/mastodon/pull/20540), [Gargron](https://github.com/mastodon/mastodon/pull/20628))
|
|
||||||
- Change table header to be sticky in admin UI ([sk22](https://github.com/mastodon/mastodon/pull/20442))
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
|
|
||||||
- Remove setting that disables account deletes ([Gargron](https://github.com/mastodon/mastodon/pull/17683))
|
|
||||||
- Remove digest e-mails ([Gargron](https://github.com/mastodon/mastodon/pull/17985))
|
|
||||||
- Remove unnecessary sections from welcome e-mail ([Gargron](https://github.com/mastodon/mastodon/pull/19299))
|
|
||||||
- Remove item titles from RSS feeds ([Gargron](https://github.com/mastodon/mastodon/pull/18640))
|
|
||||||
- Remove volume number from hashtags in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19253))
|
|
||||||
- Remove Nanobox configuration ([tonyjiang](https://github.com/mastodon/mastodon/pull/17881))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix rules with same priority being sorted non-deterministically ([Gargron](https://github.com/mastodon/mastodon/pull/20623))
|
|
||||||
- Fix error when invalid domain name is submitted ([Gargron](https://github.com/mastodon/mastodon/pull/19474))
|
|
||||||
- Fix icons having an image role ([Gargron](https://github.com/mastodon/mastodon/pull/20600))
|
|
||||||
- Fix connections to IPv6-only servers ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20108))
|
|
||||||
- Fix unnecessary service worker registration and preloading when logged out in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20341))
|
|
||||||
- Fix unnecessary and slow regex construction ([raggi](https://github.com/mastodon/mastodon/pull/20215))
|
|
||||||
- Fix `mailers` queue not being used for mailers ([Gargron](https://github.com/mastodon/mastodon/pull/20274))
|
|
||||||
- Fix error in webfinger redirect handling ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20260))
|
|
||||||
- Fix report category not being set to `violation` if rule IDs are provided ([trwnh](https://github.com/mastodon/mastodon/pull/20137))
|
|
||||||
- Fix nodeinfo metadata attribute being an array instead of an object ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20114))
|
|
||||||
- Fix account endorsements not being idempotent ([trwnh](https://github.com/mastodon/mastodon/pull/20118))
|
|
||||||
- Fix status and rule IDs not being strings in admin reports REST API ([trwnh](https://github.com/mastodon/mastodon/pull/20122))
|
|
||||||
- Fix error on invalid `replies_policy` in REST API ([trwnh](https://github.com/mastodon/mastodon/pull/20126))
|
|
||||||
- Fix redrafting a currently-editing post not leaving edit mode in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20023))
|
|
||||||
- Fix performance by avoiding method cache busts ([raggi](https://github.com/mastodon/mastodon/pull/19957))
|
|
||||||
- Fix opening the language picker scrolling the single-column view to the top in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19983))
|
|
||||||
- Fix content warning button missing `aria-expanded` attribute in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19975))
|
|
||||||
- Fix redundant `aria-pressed` attributes in web UI ([Brawaru](https://github.com/mastodon/mastodon/pull/19912))
|
|
||||||
- Fix crash when external auth provider has no display name set ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19962))
|
|
||||||
- Fix followers count not being updated when migrating follows ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19998))
|
|
||||||
- Fix double button to clear emoji search input in web UI ([sunny](https://github.com/mastodon/mastodon/pull/19888))
|
|
||||||
- Fix missing null check on applications on strike disputes ([kescherCode](https://github.com/mastodon/mastodon/pull/19851))
|
|
||||||
- Fix featured tags not saving preferred casing ([Gargron](https://github.com/mastodon/mastodon/pull/19732))
|
|
||||||
- Fix language not being saved when editing status ([Gargron](https://github.com/mastodon/mastodon/pull/19543))
|
|
||||||
- Fix not being able to input featured tag with hash symbol ([Gargron](https://github.com/mastodon/mastodon/pull/19535))
|
|
||||||
- Fix user clean-up scheduler crash when an unconfirmed account has a moderation note ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19629))
|
|
||||||
- Fix being unable to withdraw follow request when confirmation modal is disabled in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19687))
|
|
||||||
- Fix inaccurate admin log entry for re-sending confirmation e-mails ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19674))
|
|
||||||
- Fix edits not being immediately reflected ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19673))
|
|
||||||
- Fix bookmark import stopping at the first failure ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19669))
|
|
||||||
- Fix account action type validation ([Gargron](https://github.com/mastodon/mastodon/pull/19476))
|
|
||||||
- Fix upload progress not communicating processing phase in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19530))
|
|
||||||
- Fix wrong host being used for custom.css when asset host configured ([Gargron](https://github.com/mastodon/mastodon/pull/19521))
|
|
||||||
- Fix account migration form ever using outdated account data ([Gargron](https://github.com/mastodon/mastodon/pull/18429), [nightpool](https://github.com/mastodon/mastodon/pull/19883))
|
|
||||||
- Fix error when uploading malformed CSV import ([Gargron](https://github.com/mastodon/mastodon/pull/19509))
|
|
||||||
- Fix avatars not using image tags in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19488))
|
|
||||||
- Fix handling of duplicate and out-of-order notifications in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19693))
|
|
||||||
- Fix reblogs being discarded after the reblogged status ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19731))
|
|
||||||
- Fix indexing scheduler trying to index when Elasticsearch is disabled ([Gargron](https://github.com/mastodon/mastodon/pull/19805))
|
|
||||||
- Fix n+1 queries when rendering initial state JSON ([Gargron](https://github.com/mastodon/mastodon/pull/19795))
|
|
||||||
- Fix n+1 query during status removal ([Gargron](https://github.com/mastodon/mastodon/pull/19753))
|
|
||||||
- Fix OCR not working due to Content Security Policy in web UI ([prplecake](https://github.com/mastodon/mastodon/pull/18817))
|
|
||||||
- Fix `nofollow` rel being removed in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19455))
|
|
||||||
- Fix language dropdown causing zoom on mobile devices in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19428))
|
|
||||||
- Fix button to dismiss suggestions not showing up in search results in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19325))
|
|
||||||
- Fix language dropdown sometimes not appearing in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19246))
|
|
||||||
- Fix quickly switching notification filters resulting in empty or incorrect list in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19052), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18960))
|
|
||||||
- Fix media modal link button in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18877))
|
|
||||||
- Fix error upon successful account migration ([Gargron](https://github.com/mastodon/mastodon/pull/19386))
|
|
||||||
- Fix negatives values in search index causing queries to fail ([Gargron](https://github.com/mastodon/mastodon/pull/19464), [Gargron](https://github.com/mastodon/mastodon/pull/19481))
|
|
||||||
- Fix error when searching for invalid URL ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18580))
|
|
||||||
- Fix IP blocks not having a unique index ([Gargron](https://github.com/mastodon/mastodon/pull/19456))
|
|
||||||
- Fix remote account in contact account setting not being used ([Gargron](https://github.com/mastodon/mastodon/pull/19351))
|
|
||||||
- Fix swallowing mentions of unconfirmed/unapproved users ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19191))
|
|
||||||
- Fix incorrect and slow cache invalidation when blocking domain and removing media attachments ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19062))
|
|
||||||
- Fix HTTPs redirect behaviour when running as I2P service ([gi-yt](https://github.com/mastodon/mastodon/pull/18929))
|
|
||||||
- Fix deleted pinned posts potentially counting towards the pinned posts limit ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19005))
|
|
||||||
- Fix compatibility with OpenSSL 3.0 ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18449))
|
|
||||||
- Fix error when a remote report includes a private post the server has no access to ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18760))
|
|
||||||
- Fix suspicious sign-in mails never being sent ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18599))
|
|
||||||
- Fix fallback locale when somehow user's locale is an empty string ([tribela](https://github.com/mastodon/mastodon/pull/18543))
|
|
||||||
- Fix avatar/header not being deleted locally when deleted on remote account ([tribela](https://github.com/mastodon/mastodon/pull/18973))
|
|
||||||
- Fix missing `,` in Blurhash validation ([noellabo](https://github.com/mastodon/mastodon/pull/18660))
|
|
||||||
- Fix order by most recent not working for relationships page in admin UI ([tribela](https://github.com/mastodon/mastodon/pull/18996))
|
|
||||||
- Fix uncaught error when invalid date is supplied to API ([Gargron](https://github.com/mastodon/mastodon/pull/19480))
|
|
||||||
- Fix REST API sometimes returning HTML on error ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19135))
|
|
||||||
- Fix ambiguous column names in `tootctl media refresh` ([tribela](https://github.com/mastodon/mastodon/pull/19206))
|
|
||||||
- Fix ambiguous column names in `tootctl search deploy` ([mashirozx](https://github.com/mastodon/mastodon/pull/18993))
|
|
||||||
- Fix `CDN_HOST` not being used in some asset URLs ([tribela](https://github.com/mastodon/mastodon/pull/18662))
|
|
||||||
- Fix `CAS_DISPLAY_NAME`, `SAML_DISPLAY_NAME` and `OIDC_DISPLAY_NAME` being ignored ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18568))
|
|
||||||
- Fix various typos in comments throughout the codebase ([luzpaz](https://github.com/mastodon/mastodon/pull/18604))
|
|
||||||
- Fix CSV import error when rows include unicode characters ([HamptonMakes](https://github.com/mastodon/mastodon/pull/20592))
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Fix being able to spoof link verification ([Gargron](https://github.com/mastodon/mastodon/pull/20217))
|
|
||||||
- Fix emoji substitution not applying only to text nodes in backend code ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20641))
|
|
||||||
- Fix emoji substitution not applying only to text nodes in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20640))
|
|
||||||
- Fix rate limiting for paths with formats ([Gargron](https://github.com/mastodon/mastodon/pull/20675))
|
|
||||||
- Fix out-of-bound reads in blurhash transcoder ([delroth](https://github.com/mastodon/mastodon/pull/20388))
|
|
||||||
|
|
||||||
_For previous changes, review the [stable-3.5 branch](https://github.com/mastodon/mastodon/blob/stable-3.5/CHANGELOG.md)_
|
|
||||||
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
|||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment include:
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
- Using welcoming and inclusive language
|
* Using welcoming and inclusive language
|
||||||
- Being respectful of differing viewpoints and experiences
|
* Being respectful of differing viewpoints and experiences
|
||||||
- Gracefully accepting constructive criticism
|
* Gracefully accepting constructive criticism
|
||||||
- Focusing on what is best for the community
|
* Focusing on what is best for the community
|
||||||
- Showing empathy towards other community members
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
- Public or private harassment
|
* Public or private harassment
|
||||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
## Our Responsibilities
|
## Our Responsibilities
|
||||||
|
|
||||||
@@ -34,13 +34,13 @@ This Code of Conduct applies both within project spaces and in public spaces whe
|
|||||||
|
|
||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at glitch-abuse@sitedethib.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at beatrix.bitrot@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
[homepage]: https://contributor-covenant.org
|
[homepage]: http://contributor-covenant.org
|
||||||
[version]: https://contributor-covenant.org/version/1/4/
|
[version]: http://contributor-covenant.org/version/1/4/
|
||||||
|
|||||||
108
CONTRIBUTING.md
108
CONTRIBUTING.md
@@ -1,87 +1,91 @@
|
|||||||
# Contributing to Mastodon Glitch Edition
|
# Contributing to Mastodon Glitch Edition #
|
||||||
|
|
||||||
Thank you for your interest in contributing to the `glitch-soc` project!
|
Thank you for your interest in contributing to the `glitch-soc` project!
|
||||||
Here are some guidelines, and ways you can help.
|
Here are some guidelines, and ways you can help.
|
||||||
|
|
||||||
> (This document is a bit of a work-in-progress, so please bear with us.
|
> (This document is a bit of a work-in-progress, so please bear with us.
|
||||||
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
||||||
|
|
||||||
## Translations
|
## Planning ##
|
||||||
|
|
||||||
You can submit glitch-soc-specific translations via [Crowdin](https://crowdin.com/project/glitch-soc). They are periodically merged into the codebase.
|
|
||||||
|
|
||||||
[](https://crowdin.com/project/glitch-soc)
|
|
||||||
|
|
||||||
## Planning
|
|
||||||
|
|
||||||
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
|
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
|
||||||
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
||||||
|
|
||||||
## Documentation
|
## Documentation ##
|
||||||
|
|
||||||
The documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
The documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
||||||
Right now, we've mostly focused on the features that make this fork different from upstream in some manner.
|
Right now, we've mostly focused on the features that make this fork different from upstream in some manner.
|
||||||
Adding screenshots, improving descriptions, and so forth are all ways to help contribute to the project even if you don't know any code.
|
Adding screenshots, improving descriptions, and so forth are all ways to help contribute to the project even if you don't know any code.
|
||||||
|
|
||||||
## Frontend Development
|
## Frontend Development ##
|
||||||
|
|
||||||
Check out [the documentation here](https://glitch-soc.github.io/docs/contributing/frontend/) for more information.
|
Check out [the documentation here](https://glitch-soc.github.io/docs/contributing/frontend/) for more information.
|
||||||
|
|
||||||
## Backend Development
|
## Backend Development ##
|
||||||
|
|
||||||
See the guidelines below.
|
See the guidelines below.
|
||||||
|
|
||||||
---
|
- - -
|
||||||
|
|
||||||
You should also try to follow the guidelines set out in the original `CONTRIBUTING.md` from `mastodon/mastodon`, reproduced below.
|
You should also try to follow the guidelines set out in the original `CONTRIBUTING.md` from `tootsuite/mastodon`, reproduced below.
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
# Contributing
|
CONTRIBUTING
|
||||||
|
============
|
||||||
|
|
||||||
Thank you for considering contributing to Mastodon 🐘
|
There are three ways in which you can contribute to this repository:
|
||||||
|
|
||||||
You can contribute in the following ways:
|
1. By improving the documentation
|
||||||
|
2. By working on the back-end application
|
||||||
|
3. By working on the front-end application
|
||||||
|
|
||||||
- Finding and reporting bugs
|
Choosing what to work on in a large open source project is not easy. The list of [GitHub issues](https://github.com/tootsuite/mastodon/issues) may provide some ideas, but not every feature request has been greenlit. Likewise, not every change or feature that resolves a personal itch will be merged into the main repository. Some communication ahead of time may be wise. If your addition creates a new feature or setting, or otherwise changes how things work in some substantial way, please remember to submit a correlating pull request to document your changes in the [documentation](http://github.com/tootsuite/documentation).
|
||||||
- Translating the Mastodon interface into various languages
|
|
||||||
- Contributing code to Mastodon by fixing bugs or implementing features
|
|
||||||
- Improving the documentation
|
|
||||||
|
|
||||||
If your contributions are accepted into Mastodon, you can request to be paid through [our OpenCollective](https://opencollective.com/mastodon).
|
Below are the guidelines for working on pull requests:
|
||||||
|
|
||||||
## Bug reports
|
## General
|
||||||
|
|
||||||
Bug reports and feature suggestions must use descriptive and concise titles and be submitted to [GitHub Issues](https://github.com/mastodon/mastodon/issues). Please use the search function to make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected.
|
- 2 spaces indentation
|
||||||
|
|
||||||
## Translations
|
|
||||||
|
|
||||||
You can submit translations via [Crowdin](https://crowdin.com/project/mastodon). They are periodically merged into the codebase.
|
|
||||||
|
|
||||||
[](https://crowdin.com/project/mastodon)
|
|
||||||
|
|
||||||
## Pull requests
|
|
||||||
|
|
||||||
**Please use clean, concise titles for your pull requests.** Unless the pull request is about refactoring code, updating dependencies or other internal tasks, assume that the person reading the pull request title is not a programmer or Mastodon developer, but instead a Mastodon user or server administrator, and **try to describe your change or fix from their perspective**. We use commit squashing, so the final commit in the main branch will carry the title of the pull request, and commits from the main branch are fed into the changelog. The changelog is separated into [keepachangelog.com categories](https://keepachangelog.com/en/1.0.0/), and while that spec does not prescribe how the entries ought to be named, for easier sorting, start your pull request titles using one of the verbs "Add", "Change", "Deprecate", "Remove", or "Fix" (present tense).
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
| Not ideal | Better |
|
|
||||||
| ------------------------------------ | ------------------------------------------------------------- |
|
|
||||||
| Fixed NoMethodError in RemovalWorker | Fix nil error when removing statuses caused by race condition |
|
|
||||||
|
|
||||||
It is not always possible to phrase every change in such a manner, but it is desired.
|
|
||||||
|
|
||||||
**The smaller the set of changes in the pull request is, the quicker it can be reviewed and merged.** Splitting tasks into multiple smaller pull requests is often preferable.
|
|
||||||
|
|
||||||
**Pull requests that do not pass automated checks may not be reviewed**. In particular, you need to keep in mind:
|
|
||||||
|
|
||||||
- Unit and integration tests (rspec, jest)
|
|
||||||
- Code style rules (rubocop, eslint)
|
|
||||||
- Normalization of locale files (i18n-tasks)
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/documentation](https://github.com/mastodon/documentation).
|
- No spelling mistakes
|
||||||
|
- No orthographic mistakes
|
||||||
|
- No Markdown syntax errors
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Ruby
|
||||||
|
- Node.js
|
||||||
|
- PostgreSQL
|
||||||
|
- Redis
|
||||||
|
- Nginx (optional)
|
||||||
|
|
||||||
|
## Back-end application
|
||||||
|
|
||||||
|
It is expected that you have a working development environment set up. The development environment includes [rubocop](https://github.com/bbatsov/rubocop), which checks your Ruby code for compliance with our style guide and best practices. Sublime Text, likely like other editors, has a [Rubocop plugin](https://github.com/pderichs/sublime_rubocop) that runs checks on files as you edit them. The codebase also has a test suite.
|
||||||
|
|
||||||
|
* The codebase is not perfect, at the time of writing, but it is expected that you do not introduce new code style violations
|
||||||
|
* The rspec test suite must pass
|
||||||
|
* To the extent that it is possible, verify your changes. In the best case, by adding new tests to the test suite. At the very least, by running the server or console and checking it manually
|
||||||
|
* If you are introducing new strings to the user interface, they must be using localization methods
|
||||||
|
|
||||||
|
If your code has syntax errors that won't let it run, it's a good sign that the pull request isn't ready for submission yet.
|
||||||
|
|
||||||
|
## Front-end application
|
||||||
|
|
||||||
|
It is expected that you have a working development environment set up (see back-end application section). This project includes an ESLint configuration file, with which you can lint your changes.
|
||||||
|
|
||||||
|
* Avoid grave ESLint violations
|
||||||
|
* Verify that your changes work
|
||||||
|
* If you are introducing new strings, they must be using localization methods
|
||||||
|
|
||||||
|
If the JavaScript or CSS assets won't compile due to a syntax error, it's a good sign that the pull request isn't ready for submission yet.
|
||||||
|
|
||||||
|
## Translate
|
||||||
|
|
||||||
|
You can contribute to translating Mastodon via Weblate at [weblate.joinmastodon.org](https://weblate.joinmastodon.org/).
|
||||||
|
[](https://weblate.joinmastodon.org/)
|
||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|||||||
14
Capfile
Normal file
14
Capfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
require 'capistrano/setup'
|
||||||
|
require 'capistrano/deploy'
|
||||||
|
require 'capistrano/scm/git'
|
||||||
|
|
||||||
|
install_plugin Capistrano::SCM::Git
|
||||||
|
|
||||||
|
require 'capistrano/rbenv'
|
||||||
|
require 'capistrano/bundler'
|
||||||
|
require 'capistrano/yarn'
|
||||||
|
require 'capistrano/rails/assets'
|
||||||
|
require 'capistrano/rails/migrations'
|
||||||
|
|
||||||
|
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
|
||||||
188
Dockerfile
188
Dockerfile
@@ -1,112 +1,88 @@
|
|||||||
# syntax=docker/dockerfile:1.4
|
FROM ruby:2.4.4-alpine3.6
|
||||||
# This needs to be bookworm-slim because the Ruby image is built on bookworm-slim
|
|
||||||
ARG NODE_VERSION="20.9-bookworm-slim"
|
|
||||||
|
|
||||||
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.2.2-slim as ruby
|
LABEL maintainer="https://github.com/tootsuite/mastodon" \
|
||||||
FROM node:${NODE_VERSION} as build
|
description="Your self-hosted, globally interconnected microblogging community"
|
||||||
|
|
||||||
COPY --link --from=ruby /opt/ruby /opt/ruby
|
ARG UID=991
|
||||||
|
ARG GID=991
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
ENV RAILS_SERVE_STATIC_FILES=true \
|
||||||
PATH="${PATH}:/opt/ruby/bin"
|
RAILS_ENV=production NODE_ENV=production
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
ARG YARN_VERSION=1.3.2
|
||||||
|
ARG YARN_DOWNLOAD_SHA256=6cfe82e530ef0837212f13e45c1565ba53f5199eec2527b85ecbcd88bf26821d
|
||||||
|
ARG LIBICONV_VERSION=1.15
|
||||||
|
ARG LIBICONV_DOWNLOAD_SHA256=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
|
||||||
|
|
||||||
WORKDIR /opt/mastodon
|
|
||||||
|
|
||||||
# hadolint ignore=DL3008
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -yq dist-upgrade && \
|
|
||||||
apt-get install -y --no-install-recommends build-essential \
|
|
||||||
git \
|
|
||||||
libicu-dev \
|
|
||||||
libidn-dev \
|
|
||||||
libpq-dev \
|
|
||||||
libjemalloc-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
libgdbm-dev \
|
|
||||||
libgmp-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libyaml-dev \
|
|
||||||
ca-certificates \
|
|
||||||
libreadline8 \
|
|
||||||
python3 \
|
|
||||||
shared-mime-info && \
|
|
||||||
bundle config set --local deployment 'true' && \
|
|
||||||
bundle config set --local without 'development test' && \
|
|
||||||
bundle config set silence_root_warning true && \
|
|
||||||
corepack enable
|
|
||||||
|
|
||||||
COPY Gemfile* package.json yarn.lock .yarnrc.yml /opt/mastodon/
|
|
||||||
COPY streaming/package.json /opt/mastodon/streaming/
|
|
||||||
COPY .yarn /opt/mastodon/.yarn
|
|
||||||
|
|
||||||
RUN bundle install -j"$(nproc)"
|
|
||||||
|
|
||||||
RUN yarn workspaces focus --all --production && \
|
|
||||||
yarn cache clean
|
|
||||||
|
|
||||||
FROM node:${NODE_VERSION}
|
|
||||||
|
|
||||||
# Use those args to specify your own version flags & suffixes
|
|
||||||
ARG MASTODON_VERSION_PRERELEASE=""
|
|
||||||
ARG MASTODON_VERSION_METADATA=""
|
|
||||||
|
|
||||||
ARG UID="991"
|
|
||||||
ARG GID="991"
|
|
||||||
|
|
||||||
COPY --link --from=ruby /opt/ruby /opt/ruby
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
|
||||||
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"
|
|
||||||
|
|
||||||
# Ignoring these here since we don't want to pin any versions and the Debian image removes apt-get content after use
|
|
||||||
# hadolint ignore=DL3008,DL3009
|
|
||||||
RUN apt-get update && \
|
|
||||||
echo "Etc/UTC" > /etc/localtime && \
|
|
||||||
groupadd -g "${GID}" mastodon && \
|
|
||||||
useradd -l -u "$UID" -g "${GID}" -m -d /opt/mastodon mastodon && \
|
|
||||||
apt-get -y --no-install-recommends install whois \
|
|
||||||
wget \
|
|
||||||
procps \
|
|
||||||
libssl3 \
|
|
||||||
libpq5 \
|
|
||||||
imagemagick \
|
|
||||||
ffmpeg \
|
|
||||||
libjemalloc2 \
|
|
||||||
libicu72 \
|
|
||||||
libidn12 \
|
|
||||||
libyaml-0-2 \
|
|
||||||
file \
|
|
||||||
ca-certificates \
|
|
||||||
tzdata \
|
|
||||||
libreadline8 \
|
|
||||||
tini && \
|
|
||||||
ln -s /opt/mastodon /mastodon && \
|
|
||||||
corepack enable
|
|
||||||
|
|
||||||
# Note: no, cleaning here since Debian does this automatically
|
|
||||||
# See the file /etc/apt/apt.conf.d/docker-clean within the Docker image's filesystem
|
|
||||||
|
|
||||||
COPY --chown=mastodon:mastodon . /opt/mastodon
|
|
||||||
COPY --chown=mastodon:mastodon --from=build /opt/mastodon /opt/mastodon
|
|
||||||
|
|
||||||
ENV RAILS_ENV="production" \
|
|
||||||
NODE_ENV="production" \
|
|
||||||
RAILS_SERVE_STATIC_FILES="true" \
|
|
||||||
BIND="0.0.0.0" \
|
|
||||||
MASTODON_VERSION_PRERELEASE="${MASTODON_VERSION_PRERELEASE}" \
|
|
||||||
MASTODON_VERSION_METADATA="${MASTODON_VERSION_METADATA}"
|
|
||||||
|
|
||||||
# Set the run user
|
|
||||||
USER mastodon
|
|
||||||
WORKDIR /opt/mastodon
|
|
||||||
|
|
||||||
# Precompile assets
|
|
||||||
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile
|
|
||||||
|
|
||||||
# Set the work dir and the container entry point
|
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
||||||
EXPOSE 3000 4000
|
EXPOSE 3000 4000
|
||||||
|
|
||||||
|
WORKDIR /mastodon
|
||||||
|
|
||||||
|
RUN apk -U upgrade \
|
||||||
|
&& apk add -t build-dependencies \
|
||||||
|
build-base \
|
||||||
|
icu-dev \
|
||||||
|
libidn-dev \
|
||||||
|
libressl \
|
||||||
|
libtool \
|
||||||
|
postgresql-dev \
|
||||||
|
protobuf-dev \
|
||||||
|
python \
|
||||||
|
&& apk add \
|
||||||
|
ca-certificates \
|
||||||
|
ffmpeg \
|
||||||
|
file \
|
||||||
|
git \
|
||||||
|
icu-libs \
|
||||||
|
imagemagick \
|
||||||
|
libidn \
|
||||||
|
libpq \
|
||||||
|
nodejs \
|
||||||
|
nodejs-npm \
|
||||||
|
protobuf \
|
||||||
|
tini \
|
||||||
|
tzdata \
|
||||||
|
&& update-ca-certificates \
|
||||||
|
&& mkdir -p /tmp/src /opt \
|
||||||
|
&& wget -O yarn.tar.gz "https://github.com/yarnpkg/yarn/releases/download/v$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
|
||||||
|
&& echo "$YARN_DOWNLOAD_SHA256 *yarn.tar.gz" | sha256sum -c - \
|
||||||
|
&& tar -xzf yarn.tar.gz -C /tmp/src \
|
||||||
|
&& rm yarn.tar.gz \
|
||||||
|
&& mv /tmp/src/yarn-v$YARN_VERSION /opt/yarn \
|
||||||
|
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
|
||||||
|
&& wget -O libiconv.tar.gz "https://ftp.gnu.org/pub/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz" \
|
||||||
|
&& echo "$LIBICONV_DOWNLOAD_SHA256 *libiconv.tar.gz" | sha256sum -c - \
|
||||||
|
&& tar -xzf libiconv.tar.gz -C /tmp/src \
|
||||||
|
&& rm libiconv.tar.gz \
|
||||||
|
&& cd /tmp/src/libiconv-$LIBICONV_VERSION \
|
||||||
|
&& ./configure --prefix=/usr/local \
|
||||||
|
&& make -j$(getconf _NPROCESSORS_ONLN)\
|
||||||
|
&& make install \
|
||||||
|
&& libtool --finish /usr/local/lib \
|
||||||
|
&& cd /mastodon \
|
||||||
|
&& rm -rf /tmp/* /var/cache/apk/*
|
||||||
|
|
||||||
|
COPY Gemfile Gemfile.lock package.json yarn.lock .yarnclean /mastodon/
|
||||||
|
COPY stack-fix.c /lib
|
||||||
|
RUN gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so
|
||||||
|
RUN rm /lib/stack-fix.c
|
||||||
|
|
||||||
|
RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
|
||||||
|
&& bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without test development \
|
||||||
|
&& yarn --pure-lockfile \
|
||||||
|
&& yarn cache clean
|
||||||
|
|
||||||
|
RUN addgroup -g ${GID} mastodon && adduser -h /mastodon -s /bin/sh -D -G mastodon -u ${UID} mastodon \
|
||||||
|
&& mkdir -p /mastodon/public/system /mastodon/public/assets /mastodon/public/packs \
|
||||||
|
&& chown -R mastodon:mastodon /mastodon/public
|
||||||
|
|
||||||
|
COPY . /mastodon
|
||||||
|
|
||||||
|
RUN chown -R mastodon:mastodon /mastodon
|
||||||
|
|
||||||
|
VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs
|
||||||
|
|
||||||
|
USER mastodon
|
||||||
|
|
||||||
|
ENV LD_PRELOAD=/lib/stack-fix.so
|
||||||
|
ENTRYPOINT ["/sbin/tini", "--"]
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
## ActivityPub federation in Mastodon
|
|
||||||
|
|
||||||
Mastodon largely follows the ActivityPub server-to-server specification but it makes uses of some non-standard extensions, some of which are required for interacting with Mastodon at all.
|
|
||||||
|
|
||||||
Supported vocabulary: https://docs.joinmastodon.org/spec/activitypub/
|
|
||||||
|
|
||||||
### Required extensions
|
|
||||||
|
|
||||||
#### Webfinger
|
|
||||||
|
|
||||||
In Mastodon, users are identified by a `username` and `domain` pair (e.g., `Gargron@mastodon.social`).
|
|
||||||
This is used both for discovery and for unambiguously mentioning users across the fediverse. Furthermore, this is part of Mastodon's database design from its very beginnings.
|
|
||||||
|
|
||||||
As a result, Mastodon requires that each ActivityPub actor uniquely maps back to an `acct:` URI that can be resolved via WebFinger.
|
|
||||||
|
|
||||||
More information and examples are available at: https://docs.joinmastodon.org/spec/webfinger/
|
|
||||||
|
|
||||||
#### HTTP Signatures
|
|
||||||
|
|
||||||
In order to authenticate activities, Mastodon relies on HTTP Signatures, signing every `POST` and `GET` request to other ActivityPub implementations on behalf of the user authoring an activity (for `POST` requests) or an actor representing the Mastodon server itself (for most `GET` requests).
|
|
||||||
|
|
||||||
Mastodon requires all `POST` requests to be signed, and MAY require `GET` requests to be signed, depending on the configuration of the Mastodon server.
|
|
||||||
|
|
||||||
More information on HTTP Signatures, as well as examples, can be found here: https://docs.joinmastodon.org/spec/security/#http
|
|
||||||
|
|
||||||
### Optional extensions
|
|
||||||
|
|
||||||
- Linked-Data Signatures: https://docs.joinmastodon.org/spec/security/#ld
|
|
||||||
- Bearcaps: https://docs.joinmastodon.org/spec/bearcaps/
|
|
||||||
- Followers collection synchronization: https://codeberg.org/fediverse/fep/src/branch/main/fep/8fcf/fep-8fcf.md
|
|
||||||
- Search indexing consent for actors: https://codeberg.org/fediverse/fep/src/branch/main/fep/5feb/fep-5feb.md
|
|
||||||
281
Gemfile
281
Gemfile
@@ -1,211 +1,148 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
ruby '>= 3.0.0'
|
ruby '>= 2.3.0', '< 2.6.0'
|
||||||
|
|
||||||
gem 'puma', '~> 6.3'
|
gem 'pkg-config', '~> 1.3'
|
||||||
gem 'rails', '~> 7.1.1'
|
|
||||||
gem 'sprockets', '~> 3.7.2'
|
|
||||||
gem 'thor', '~> 1.2'
|
|
||||||
gem 'rack', '~> 2.2.7'
|
|
||||||
|
|
||||||
# For why irb is in the Gemfile, see: https://ruby.social/@st0012/111444685161478182
|
gem 'puma', '~> 3.11'
|
||||||
gem 'irb', '~> 1.8'
|
gem 'rails', '~> 5.2.0'
|
||||||
|
|
||||||
gem 'haml-rails', '~>2.0'
|
gem 'hamlit-rails', '~> 0.2'
|
||||||
gem 'pg', '~> 1.5'
|
gem 'pg', '~> 1.0'
|
||||||
gem 'pghero'
|
gem 'pghero', '~> 2.1'
|
||||||
gem 'dotenv-rails', '~> 2.8'
|
gem 'dotenv-rails', '~> 2.2', '< 2.3'
|
||||||
|
|
||||||
gem 'aws-sdk-s3', '~> 1.123', require: false
|
gem 'aws-sdk-s3', '~> 1.9', require: false
|
||||||
gem 'fog-core', '<= 2.4.0'
|
gem 'fog-core', '~> 1.45'
|
||||||
gem 'fog-openstack', '~> 1.0', require: false
|
gem 'fog-local', '~> 0.5', require: false
|
||||||
gem 'kt-paperclip', '~> 7.2'
|
gem 'fog-openstack', '~> 0.1', require: false
|
||||||
gem 'md-paperclip-azure', '~> 2.2', require: false
|
gem 'paperclip', '~> 6.0'
|
||||||
gem 'blurhash', '~> 0.1'
|
gem 'paperclip-av-transcoder', '~> 0.6'
|
||||||
|
gem 'streamio-ffmpeg', '~> 3.0'
|
||||||
|
|
||||||
gem 'active_model_serializers', '~> 0.10'
|
gem 'active_model_serializers', '~> 0.10'
|
||||||
gem 'addressable', '~> 2.8'
|
gem 'addressable', '~> 2.5'
|
||||||
gem 'bootsnap', '~> 1.17.0', require: false
|
gem 'bootsnap', '~> 1.3'
|
||||||
gem 'browser'
|
gem 'browser'
|
||||||
gem 'charlock_holmes', '~> 0.7.7'
|
gem 'charlock_holmes', '~> 0.7.6'
|
||||||
gem 'chewy', '~> 7.3'
|
gem 'iso-639'
|
||||||
gem 'devise', '~> 4.9'
|
gem 'chewy', '~> 5.0'
|
||||||
gem 'devise-two-factor', '~> 4.1'
|
gem 'cld3', '~> 3.2.0'
|
||||||
|
gem 'devise', '~> 4.4'
|
||||||
|
gem 'devise-two-factor', '~> 3.0'
|
||||||
|
|
||||||
group :pam_authentication, optional: true do
|
group :pam_authentication, optional: true do
|
||||||
gem 'devise_pam_authenticatable2', '~> 9.2'
|
gem 'devise_pam_authenticatable2', '~> 9.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'net-ldap', '~> 0.18'
|
gem 'net-ldap', '~> 0.10'
|
||||||
|
gem 'omniauth-cas', '~> 1.1'
|
||||||
|
gem 'omniauth-saml', '~> 1.10'
|
||||||
|
gem 'omniauth', '~> 1.2'
|
||||||
|
|
||||||
# TODO: Point back at released omniauth-cas gem when PR merged
|
gem 'doorkeeper', '~> 4.2', '< 4.3'
|
||||||
# https://github.com/dlindahl/omniauth-cas/pull/68
|
|
||||||
gem 'omniauth-cas', github: 'stanhu/omniauth-cas', ref: '4211e6d05941b4a981f9a36b49ec166cecd0e271'
|
|
||||||
gem 'omniauth-saml', '~> 2.0'
|
|
||||||
gem 'omniauth_openid_connect', '~> 0.6.1'
|
|
||||||
gem 'omniauth', '~> 2.0'
|
|
||||||
gem 'omniauth-rails_csrf_protection', '~> 1.0'
|
|
||||||
|
|
||||||
gem 'color_diff', '~> 0.1'
|
|
||||||
gem 'discard', '~> 1.2'
|
|
||||||
gem 'doorkeeper', '~> 5.6'
|
|
||||||
gem 'ed25519', '~> 1.3'
|
|
||||||
gem 'fast_blank', '~> 1.0'
|
gem 'fast_blank', '~> 1.0'
|
||||||
gem 'fastimage'
|
gem 'fastimage'
|
||||||
|
gem 'goldfinger', '~> 2.1'
|
||||||
gem 'hiredis', '~> 0.6'
|
gem 'hiredis', '~> 0.6'
|
||||||
gem 'redis-namespace', '~> 1.10'
|
gem 'redis-namespace', '~> 1.5'
|
||||||
|
gem 'html2text'
|
||||||
gem 'htmlentities', '~> 4.3'
|
gem 'htmlentities', '~> 4.3'
|
||||||
gem 'http', '~> 5.1'
|
gem 'http', '~> 3.2'
|
||||||
gem 'http_accept_language', '~> 2.1'
|
gem 'http_accept_language', '~> 2.1'
|
||||||
gem 'httplog', '~> 1.6.2'
|
gem 'http_parser.rb', '~> 0.6', git: 'https://github.com/tmm1/http_parser.rb', ref: '54b17ba8c7d8d20a16dfc65d1775241833219cf2'
|
||||||
|
gem 'httplog', '~> 1.0'
|
||||||
gem 'idn-ruby', require: 'idn'
|
gem 'idn-ruby', require: 'idn'
|
||||||
gem 'kaminari', '~> 1.2'
|
gem 'kaminari', '~> 1.1'
|
||||||
gem 'link_header', '~> 0.0'
|
gem 'link_header', '~> 0.0'
|
||||||
gem 'mime-types', '~> 3.5.0', require: 'mime/types/columnar'
|
gem 'mime-types', '~> 3.1', require: 'mime/types/columnar'
|
||||||
gem 'nokogiri', '~> 1.15'
|
gem 'nokogiri', '~> 1.8'
|
||||||
gem 'nsa', github: 'jhawthorn/nsa', ref: 'e020fcc3a54d993ab45b7194d89ab720296c111b'
|
gem 'nsa', '~> 0.2'
|
||||||
gem 'oj', '~> 3.14'
|
gem 'oj', '~> 3.5'
|
||||||
gem 'ox', '~> 2.14'
|
gem 'ostatus2', '~> 2.0'
|
||||||
gem 'parslet'
|
gem 'ox', '~> 2.9'
|
||||||
gem 'posix-spawn'
|
gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c'
|
||||||
gem 'public_suffix', '~> 5.0'
|
gem 'pundit', '~> 1.1'
|
||||||
gem 'pundit', '~> 2.3'
|
|
||||||
gem 'premailer-rails'
|
gem 'premailer-rails'
|
||||||
gem 'rack-attack', '~> 6.6'
|
gem 'rack-attack', '~> 5.2'
|
||||||
gem 'rack-cors', '~> 2.0', require: 'rack/cors'
|
gem 'rack-cors', '~> 1.0', require: 'rack/cors'
|
||||||
gem 'rails-i18n', '~> 7.0'
|
gem 'rack-timeout', '~> 0.4'
|
||||||
gem 'rails-settings-cached', '~> 0.6', git: 'https://github.com/mastodon/rails-settings-cached.git', branch: 'v0.6.6-aliases-true'
|
gem 'rails-i18n', '~> 5.1'
|
||||||
gem 'redcarpet', '~> 3.6'
|
gem 'rails-settings-cached', '~> 0.6'
|
||||||
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
gem 'redis', '~> 4.0', require: ['redis', 'redis/connection/hiredis']
|
||||||
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
||||||
gem 'rqrcode', '~> 2.2'
|
gem 'rqrcode', '~> 0.10'
|
||||||
gem 'ruby-progressbar', '~> 1.13'
|
gem 'ruby-progressbar', '~> 1.4'
|
||||||
gem 'sanitize', '~> 6.0'
|
gem 'sanitize', '~> 4.6'
|
||||||
gem 'scenic', '~> 1.7'
|
gem 'sidekiq', '~> 5.1'
|
||||||
gem 'sidekiq', '~> 6.5'
|
gem 'sidekiq-scheduler', '~> 2.2'
|
||||||
gem 'sidekiq-scheduler', '~> 5.0'
|
gem 'sidekiq-unique-jobs', '~> 5.0'
|
||||||
gem 'sidekiq-unique-jobs', '~> 7.1'
|
gem 'sidekiq-bulk', '~>0.1.1'
|
||||||
gem 'sidekiq-bulk', '~> 0.2.0'
|
gem 'simple-navigation', '~> 4.0'
|
||||||
gem 'simple-navigation', '~> 4.4'
|
gem 'simple_form', '~> 4.0'
|
||||||
gem 'simple_form', '~> 5.2'
|
gem 'sprockets-rails', '~> 3.2', require: 'sprockets/railtie'
|
||||||
gem 'sprockets-rails', '~> 3.4', require: 'sprockets/railtie'
|
gem 'stoplight', '~> 2.1.3'
|
||||||
gem 'stoplight', '~> 3.0.1'
|
gem 'strong_migrations', '~> 0.2'
|
||||||
gem 'strong_migrations', '1.6.4'
|
gem 'tty-command', '~> 0.8', require: false
|
||||||
gem 'tty-prompt', '~> 0.23', require: false
|
gem 'tty-prompt', '~> 0.16', require: false
|
||||||
gem 'twitter-text', '~> 3.1.0'
|
gem 'twitter-text', '~> 1.14'
|
||||||
gem 'tzinfo-data', '~> 1.2023'
|
gem 'tzinfo-data', '~> 1.2018'
|
||||||
gem 'webpacker', '~> 5.4'
|
gem 'webpacker', '~> 3.4'
|
||||||
gem 'webpush', github: 'ClearlyClaire/webpush', ref: 'f14a4d52e201128b1b00245d11b6de80d6cfdcd9'
|
gem 'webpush'
|
||||||
gem 'webauthn', '~> 3.0'
|
|
||||||
|
|
||||||
gem 'json-ld'
|
gem 'json-ld', '~> 2.2'
|
||||||
gem 'json-ld-preloaded', '~> 3.2'
|
gem 'rdf-normalize', '~> 0.3'
|
||||||
gem 'rdf-normalize', '~> 0.5'
|
|
||||||
|
|
||||||
gem 'private_address_check', '~> 0.5'
|
group :development, :test do
|
||||||
|
gem 'fabrication', '~> 2.20'
|
||||||
|
gem 'fuubar', '~> 2.2'
|
||||||
|
gem 'i18n-tasks', '~> 0.9', require: false
|
||||||
|
gem 'pry-byebug', '~> 3.6'
|
||||||
|
gem 'pry-rails', '~> 0.3'
|
||||||
|
gem 'rspec-rails', '~> 3.7'
|
||||||
|
end
|
||||||
|
|
||||||
|
group :production, :test do
|
||||||
|
gem 'private_address_check', '~> 0.4.1'
|
||||||
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
# Adds RSpec Error/Warning annotations to GitHub PRs on the Files tab
|
gem 'capybara', '~> 2.18'
|
||||||
gem 'rspec-github', '~> 2.4', require: false
|
|
||||||
|
|
||||||
# RSpec progress bar formatter
|
|
||||||
gem 'fuubar', '~> 2.5'
|
|
||||||
|
|
||||||
# RSpec helpers for email specs
|
|
||||||
gem 'email_spec'
|
|
||||||
|
|
||||||
# Extra RSpec extenion methods and helpers for sidekiq
|
|
||||||
gem 'rspec-sidekiq', '~> 4.0'
|
|
||||||
|
|
||||||
# Browser integration testing
|
|
||||||
gem 'capybara', '~> 3.39'
|
|
||||||
gem 'selenium-webdriver'
|
|
||||||
|
|
||||||
# Used to reset the database between system tests
|
|
||||||
gem 'database_cleaner-active_record'
|
|
||||||
|
|
||||||
# Used to mock environment variables
|
|
||||||
gem 'climate_control', '~> 0.2'
|
gem 'climate_control', '~> 0.2'
|
||||||
|
gem 'faker', '~> 1.8'
|
||||||
# Generating fake data for specs
|
gem 'microformats', '~> 4.0'
|
||||||
gem 'faker', '~> 3.2'
|
|
||||||
|
|
||||||
# Generate test objects for specs
|
|
||||||
gem 'fabrication', '~> 2.30'
|
|
||||||
|
|
||||||
# Add back helpers functions removed in Rails 5.1
|
|
||||||
gem 'rails-controller-testing', '~> 1.0'
|
gem 'rails-controller-testing', '~> 1.0'
|
||||||
|
gem 'rspec-sidekiq', '~> 3.0'
|
||||||
# Validate schemas in specs
|
gem 'simplecov', '~> 0.16', require: false
|
||||||
gem 'json-schema', '~> 4.0'
|
gem 'webmock', '~> 3.3'
|
||||||
|
gem 'parallel_tests', '~> 2.21'
|
||||||
# Test harness fo rack components
|
|
||||||
gem 'rack-test', '~> 2.1'
|
|
||||||
|
|
||||||
# Coverage formatter for RSpec test if DISABLE_SIMPLECOV is false
|
|
||||||
gem 'simplecov', '~> 0.22', require: false
|
|
||||||
gem 'simplecov-lcov', '~> 0.8', require: false
|
|
||||||
|
|
||||||
# Stub web requests for specs
|
|
||||||
gem 'webmock', '~> 3.18'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
# Code linting CLI and plugins
|
gem 'active_record_query_trace', '~> 1.5'
|
||||||
gem 'rubocop', require: false
|
gem 'annotate', '~> 2.7'
|
||||||
gem 'rubocop-capybara', require: false
|
gem 'better_errors', '~> 2.4'
|
||||||
gem 'rubocop-performance', require: false
|
gem 'binding_of_caller', '~> 0.7'
|
||||||
gem 'rubocop-rails', require: false
|
gem 'bullet', '~> 5.7'
|
||||||
gem 'rubocop-rspec', require: false
|
gem 'letter_opener', '~> 1.4'
|
||||||
|
gem 'letter_opener_web', '~> 1.3'
|
||||||
|
gem 'memory_profiler'
|
||||||
|
gem 'rubocop', '~> 0.55', require: false
|
||||||
|
gem 'brakeman', '~> 4.2', require: false
|
||||||
|
gem 'bundler-audit', '~> 0.6', require: false
|
||||||
|
gem 'scss_lint', '~> 0.57', require: false
|
||||||
|
|
||||||
# Annotates modules with schema
|
gem 'capistrano', '~> 3.10'
|
||||||
gem 'annotate', '~> 3.2'
|
gem 'capistrano-rails', '~> 1.3'
|
||||||
|
gem 'capistrano-rbenv', '~> 2.1'
|
||||||
|
gem 'capistrano-yarn', '~> 2.0'
|
||||||
|
|
||||||
# Enhanced error message pages for development
|
gem 'derailed_benchmarks'
|
||||||
gem 'better_errors', '~> 2.9'
|
gem 'stackprof'
|
||||||
gem 'binding_of_caller', '~> 1.0'
|
|
||||||
|
|
||||||
# Preview mail in the browser
|
|
||||||
gem 'letter_opener', '~> 1.8'
|
|
||||||
gem 'letter_opener_web', '~> 2.0'
|
|
||||||
|
|
||||||
# Security analysis CLI tools
|
|
||||||
gem 'brakeman', '~> 6.0', require: false
|
|
||||||
gem 'bundler-audit', '~> 0.9', require: false
|
|
||||||
|
|
||||||
# Linter CLI for HAML files
|
|
||||||
gem 'haml_lint', require: false
|
|
||||||
|
|
||||||
# Validate missing i18n keys
|
|
||||||
gem 'i18n-tasks', '~> 1.0', require: false
|
|
||||||
end
|
|
||||||
|
|
||||||
group :development, :test do
|
|
||||||
# Interactive Debugging tools
|
|
||||||
gem 'debug', '~> 1.8'
|
|
||||||
|
|
||||||
# Profiling tools
|
|
||||||
gem 'memory_profiler', require: false
|
|
||||||
gem 'ruby-prof', require: false
|
|
||||||
gem 'stackprof', require: false
|
|
||||||
gem 'test-prof'
|
|
||||||
|
|
||||||
# RSpec runner for rails
|
|
||||||
gem 'rspec-rails', '~> 6.0'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
gem 'lograge', '~> 0.12'
|
gem 'lograge', '~> 0.10'
|
||||||
|
gem 'redis-rails', '~> 5.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'concurrent-ruby', require: false
|
|
||||||
gem 'connection_pool', require: false
|
|
||||||
gem 'xorcist', '~> 1.1'
|
|
||||||
|
|
||||||
gem 'cocoon', '~> 1.2'
|
|
||||||
|
|
||||||
gem 'net-http', '~> 0.4.0'
|
|
||||||
gem 'rubyzip', '~> 2.3'
|
|
||||||
|
|
||||||
gem 'hcaptcha', '~> 7.1'
|
|
||||||
|
|||||||
1516
Gemfile.lock
1516
Gemfile.lock
File diff suppressed because it is too large
Load Diff
14
Procfile
14
Procfile
@@ -1,14 +1,2 @@
|
|||||||
web: bin/heroku-web
|
web: bundle exec puma -C config/puma.rb
|
||||||
worker: bundle exec sidekiq
|
worker: bundle exec sidekiq
|
||||||
|
|
||||||
# For the streaming API, you need a separate app that shares Postgres and Redis:
|
|
||||||
#
|
|
||||||
# heroku create
|
|
||||||
# heroku buildpacks:add heroku/nodejs
|
|
||||||
# heroku config:set RUN_STREAMING=true
|
|
||||||
# heroku addons:attach <main-app>::DATABASE
|
|
||||||
# heroku addons:attach <main-app>::REDIS
|
|
||||||
#
|
|
||||||
# and let the main app use the separate app:
|
|
||||||
#
|
|
||||||
# heroku config:set STREAMING_API_BASE_URL=wss://<streaming-app>.herokuapp.com -a <main-app>
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
web: env PORT=3000 RAILS_ENV=development bundle exec puma -C config/puma.rb
|
web: env PORT=3000 bundle exec puma -C config/puma.rb
|
||||||
sidekiq: env PORT=3000 RAILS_ENV=development bundle exec sidekiq
|
sidekiq: env PORT=3000 bundle exec sidekiq
|
||||||
stream: env PORT=4000 yarn workspace @mastodon/streaming start
|
stream: env PORT=4000 yarn run start
|
||||||
webpack: bin/webpack-dev-server
|
webpack: ./bin/webpack-dev-server --listen-host 0.0.0.0
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -1,14 +1,10 @@
|
|||||||
# Mastodon Glitch Edition
|
# Mastodon Glitch Edition #
|
||||||
|
|
||||||
> Now with automated deploys!
|
> Now with automated deploys!
|
||||||
|
|
||||||
[][circleci]
|
[](https://travis-ci.org/glitch-soc/mastodon)
|
||||||
[][code_climate]
|
|
||||||
|
|
||||||
[circleci]: https://circleci.com/gh/glitch-soc/mastodon
|
So here's the deal: we all work on this code, and then it runs on dev.glitch.social and anyone who uses that does so absolutely at their own risk. can you dig it?
|
||||||
[code_climate]: https://codeclimate.com/github/glitch-soc/mastodon
|
|
||||||
|
|
||||||
So here's the deal: we all work on this code, and anyone who uses that does so absolutely at their own risk. can you dig it?
|
|
||||||
|
|
||||||
- You can view documentation for this project at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/).
|
- You can view documentation for this project at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/).
|
||||||
- And contributing guidelines are available [here](CONTRIBUTING.md) and [here](https://glitch-soc.github.io/docs/contributing/).
|
- And contributing guidelines are available [here](CONTRIBUTING.md) and [here](https://glitch-soc.github.io/docs/contributing/).
|
||||||
|
|||||||
4
Rakefile
4
Rakefile
@@ -1,8 +1,6 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||||
|
|
||||||
require File.expand_path('config/application', __dir__)
|
require File.expand_path('../config/application', __FILE__)
|
||||||
|
|
||||||
Rails.application.load_tasks
|
Rails.application.load_tasks
|
||||||
|
|||||||
22
SECURITY.md
22
SECURITY.md
@@ -1,22 +0,0 @@
|
|||||||
# Security Policy
|
|
||||||
|
|
||||||
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you can either:
|
|
||||||
|
|
||||||
- open a [Github security issue on the Mastodon project](https://github.com/mastodon/mastodon/security/advisories/new)
|
|
||||||
- reach us at <security@joinmastodon.org>
|
|
||||||
|
|
||||||
You should _not_ report such issues on public GitHub issues or in other public spaces to give us time to publish a fix for the issue without exposing Mastodon's users to increased risk.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
A "vulnerability in Mastodon" is a vulnerability in the code distributed through our main source code repository on GitHub. Vulnerabilities that are specific to a given installation (e.g. misconfiguration) should be reported to the owner of that installation and not us.
|
|
||||||
|
|
||||||
## Supported Versions
|
|
||||||
|
|
||||||
| Version | Supported |
|
|
||||||
| ------- | ---------------- |
|
|
||||||
| 4.2.x | Yes |
|
|
||||||
| 4.1.x | Yes |
|
|
||||||
| 4.0.x | No |
|
|
||||||
| 3.5.x | Until 2023-12-31 |
|
|
||||||
| < 3.5 | No |
|
|
||||||
124
Vagrantfile
vendored
124
Vagrantfile
vendored
@@ -3,14 +3,16 @@
|
|||||||
|
|
||||||
ENV["PORT"] ||= "3000"
|
ENV["PORT"] ||= "3000"
|
||||||
|
|
||||||
$provisionA = <<SCRIPT
|
$provision = <<SCRIPT
|
||||||
|
|
||||||
|
cd /vagrant # This is where the host folder/repo is mounted
|
||||||
|
|
||||||
# Add the yarn repo + yarn repo keys
|
# Add the yarn repo + yarn repo keys
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||||
sudo apt-add-repository 'deb https://dl.yarnpkg.com/debian/ stable main'
|
sudo apt-add-repository 'deb https://dl.yarnpkg.com/debian/ stable main'
|
||||||
|
|
||||||
# Add repo for NodeJS
|
# Add repo for NodeJS
|
||||||
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
|
curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
|
||||||
|
|
||||||
# Add firewall rule to redirect 80 to PORT and save
|
# Add firewall rule to redirect 80 to PORT and save
|
||||||
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port #{ENV["PORT"]}
|
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port #{ENV["PORT"]}
|
||||||
@@ -31,111 +33,58 @@ sudo apt-get install \
|
|||||||
redis-tools \
|
redis-tools \
|
||||||
postgresql \
|
postgresql \
|
||||||
postgresql-contrib \
|
postgresql-contrib \
|
||||||
|
protobuf-compiler \
|
||||||
|
yarn \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
libidn11-dev \
|
libidn11-dev \
|
||||||
libreadline6-dev \
|
|
||||||
autoconf \
|
|
||||||
bison \
|
|
||||||
build-essential \
|
|
||||||
ffmpeg \
|
|
||||||
file \
|
|
||||||
gcc \
|
|
||||||
libffi-dev \
|
|
||||||
libgdbm-dev \
|
|
||||||
libjemalloc-dev \
|
|
||||||
libncurses5-dev \
|
|
||||||
libprotobuf-dev \
|
libprotobuf-dev \
|
||||||
libssl-dev \
|
libreadline-dev \
|
||||||
libyaml-dev \
|
libpam0g-dev \
|
||||||
pkg-config \
|
|
||||||
protobuf-compiler \
|
|
||||||
zlib1g-dev \
|
|
||||||
-y
|
-y
|
||||||
|
|
||||||
# Install rvm
|
# Install rvm
|
||||||
sudo apt-add-repository -y ppa:rael-gc/rvm
|
read RUBY_VERSION < .ruby-version
|
||||||
sudo apt-get install rvm -y
|
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
|
||||||
|
curl -sSL https://raw.githubusercontent.com/rvm/rvm/stable/binscripts/rvm-installer | bash -s stable --ruby=$RUBY_VERSION
|
||||||
sudo usermod -a -G rvm $USER
|
source /home/vagrant/.rvm/scripts/rvm
|
||||||
|
|
||||||
SCRIPT
|
|
||||||
|
|
||||||
$provisionElasticsearch = <<SCRIPT
|
|
||||||
# Install Elastic Search
|
|
||||||
sudo apt install openjdk-17-jre-headless -y
|
|
||||||
sudo wget -O /usr/share/keyrings/elasticsearch.asc https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
|
||||||
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/elasticsearch.asc] https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install elasticsearch -y
|
|
||||||
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
sudo systemctl enable --now elasticsearch
|
|
||||||
|
|
||||||
echo 'path.data: /var/lib/elasticsearch
|
|
||||||
path.logs: /var/log/elasticsearch
|
|
||||||
network.host: 0.0.0.0
|
|
||||||
http.port: 9200
|
|
||||||
discovery.seed_hosts: ["localhost"]
|
|
||||||
cluster.initial_master_nodes: ["node-1"]
|
|
||||||
xpack.security.enabled: false' > /etc/elasticsearch/elasticsearch.yml
|
|
||||||
|
|
||||||
sudo systemctl restart elasticsearch
|
|
||||||
|
|
||||||
# Install Kibana
|
|
||||||
sudo apt install kibana -y
|
|
||||||
sudo systemctl enable --now kibana
|
|
||||||
|
|
||||||
echo 'server.host: "0.0.0.0"
|
|
||||||
elasticsearch.hosts: ["http://localhost:9200"]' > /etc/kibana/kibana.yml
|
|
||||||
|
|
||||||
sudo systemctl restart kibana
|
|
||||||
|
|
||||||
SCRIPT
|
|
||||||
|
|
||||||
$provisionB = <<SCRIPT
|
|
||||||
|
|
||||||
source "/etc/profile.d/rvm.sh"
|
|
||||||
|
|
||||||
# Install Ruby
|
# Install Ruby
|
||||||
read RUBY_VERSION < /vagrant/.ruby-version
|
rvm reinstall ruby-$RUBY_VERSION --disable-binary
|
||||||
rvm install ruby-$RUBY_VERSION --disable-binary
|
|
||||||
|
|
||||||
# Configure database
|
# Configure database
|
||||||
sudo -u postgres createuser -U postgres vagrant -s
|
sudo -u postgres createuser -U postgres vagrant -s
|
||||||
sudo -u postgres createdb -U postgres mastodon_development
|
sudo -u postgres createdb -U postgres mastodon_development
|
||||||
|
|
||||||
cd /vagrant # This is where the host folder/repo is mounted
|
# Install gems and node modules
|
||||||
|
|
||||||
# Install gems
|
|
||||||
gem install bundler foreman
|
gem install bundler foreman
|
||||||
bundle install
|
bundle install
|
||||||
|
|
||||||
# Install node modules
|
|
||||||
sudo corepack enable
|
|
||||||
corepack prepare
|
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
# Build Mastodon
|
# Build Mastodon
|
||||||
export RAILS_ENV=development
|
|
||||||
export $(cat ".env.vagrant" | xargs)
|
export $(cat ".env.vagrant" | xargs)
|
||||||
bundle exec rails db:setup
|
bundle exec rails db:setup
|
||||||
|
|
||||||
# Configure automatic loading of environment variable
|
# Configure automatic loading of environment variable
|
||||||
echo 'export RAILS_ENV=development' >> ~/.bash_profile
|
|
||||||
echo 'export $(cat "/vagrant/.env.vagrant" | xargs)' >> ~/.bash_profile
|
echo 'export $(cat "/vagrant/.env.vagrant" | xargs)' >> ~/.bash_profile
|
||||||
|
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
|
$start = <<SCRIPT
|
||||||
|
|
||||||
|
echo 'To start server'
|
||||||
|
echo ' $ vagrant ssh -c "cd /vagrant && foreman start"'
|
||||||
|
|
||||||
|
SCRIPT
|
||||||
|
|
||||||
VAGRANTFILE_API_VERSION = "2"
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
config.vm.box = "ubuntu/focal64"
|
config.vm.box = "ubuntu/xenial64"
|
||||||
|
|
||||||
config.vm.provider :virtualbox do |vb|
|
config.vm.provider :virtualbox do |vb|
|
||||||
vb.name = "mastodon"
|
vb.name = "mastodon"
|
||||||
vb.customize ["modifyvm", :id, "--memory", "8192"]
|
vb.customize ["modifyvm", :id, "--memory", "4096"]
|
||||||
vb.customize ["modifyvm", :id, "--cpus", "3"]
|
|
||||||
|
|
||||||
# Disable VirtualBox DNS proxy to skip long-delay IPv6 resolutions.
|
# Disable VirtualBox DNS proxy to skip long-delay IPv6 resolutions.
|
||||||
# https://github.com/mitchellh/vagrant/issues/1172
|
# https://github.com/mitchellh/vagrant/issues/1172
|
||||||
@@ -145,24 +94,22 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
# Use "virtio" network interfaces for better performance.
|
# Use "virtio" network interfaces for better performance.
|
||||||
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
|
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
|
||||||
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
|
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
config.vm.hostname = "mastodon.dev"
|
||||||
|
|
||||||
# This uses the vagrant-hostsupdater plugin, and lets you
|
# This uses the vagrant-hostsupdater plugin, and lets you
|
||||||
# access the development site at http://mastodon.local.
|
# access the development site at http://mastodon.dev.
|
||||||
# If you change it, also change it in .env.vagrant before provisioning
|
|
||||||
# the vagrant server to update the development build.
|
|
||||||
#
|
|
||||||
# To install:
|
# To install:
|
||||||
# $ vagrant plugin install vagrant-hostsupdater
|
# $ vagrant plugin install vagrant-hostsupdater
|
||||||
config.vm.hostname = "mastodon.local"
|
|
||||||
|
|
||||||
if defined?(VagrantPlugins::HostsUpdater)
|
if defined?(VagrantPlugins::HostsUpdater)
|
||||||
config.vm.network :private_network, ip: "192.168.42.42", nictype: "virtio"
|
config.vm.network :private_network, ip: "192.168.42.42", nictype: "virtio"
|
||||||
config.hostsupdater.remove_on_suspend = false
|
config.hostsupdater.remove_on_suspend = false
|
||||||
end
|
end
|
||||||
|
|
||||||
if config.vm.networks.any? { |type, options| type == :private_network }
|
if config.vm.networks.any? { |type, options| type == :private_network }
|
||||||
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'actimeo=1']
|
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp']
|
||||||
else
|
else
|
||||||
config.vm.synced_folder ".", "/vagrant"
|
config.vm.synced_folder ".", "/vagrant"
|
||||||
end
|
end
|
||||||
@@ -171,20 +118,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.network :forwarded_port, guest: 3000, host: 3000
|
config.vm.network :forwarded_port, guest: 3000, host: 3000
|
||||||
config.vm.network :forwarded_port, guest: 4000, host: 4000
|
config.vm.network :forwarded_port, guest: 4000, host: 4000
|
||||||
config.vm.network :forwarded_port, guest: 8080, host: 8080
|
config.vm.network :forwarded_port, guest: 8080, host: 8080
|
||||||
config.vm.network :forwarded_port, guest: 9200, host: 9200
|
|
||||||
config.vm.network :forwarded_port, guest: 9300, host: 9300
|
|
||||||
config.vm.network :forwarded_port, guest: 9243, host: 9243
|
|
||||||
config.vm.network :forwarded_port, guest: 5601, host: 5601
|
|
||||||
|
|
||||||
# Full provisioning script, only runs on first 'vagrant up' or with 'vagrant provision'
|
# Full provisioning script, only runs on first 'vagrant up' or with 'vagrant provision'
|
||||||
config.vm.provision :shell, inline: $provisionA, privileged: false, reset: true
|
config.vm.provision :shell, inline: $provision, privileged: false
|
||||||
# Run with elevated privileges for Elasticsearch installation
|
|
||||||
config.vm.provision :shell, inline: $provisionElasticsearch, privileged: true
|
|
||||||
config.vm.provision :shell, inline: $provisionB, privileged: false
|
|
||||||
|
|
||||||
config.vm.post_up_message = <<MESSAGE
|
# Start up script, runs on every 'vagrant up'
|
||||||
To start server
|
config.vm.provision :shell, inline: $start, run: 'always', privileged: false
|
||||||
$ vagrant ssh -c "cd /vagrant && foreman start"
|
|
||||||
MESSAGE
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
28
app.json
28
app.json
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "Mastodon",
|
"name": "Mastodon",
|
||||||
"description": "A GNU Social-compatible microblogging server",
|
"description": "A GNU Social-compatible microblogging server",
|
||||||
"repository": "https://github.com/mastodon/mastodon",
|
"repository": "https://github.com/tootsuite/mastodon",
|
||||||
"logo": "https://github.com/mastodon.png",
|
"logo": "https://github.com/tootsuite.png",
|
||||||
"env": {
|
"env": {
|
||||||
"HEROKU": {
|
"HEROKU": {
|
||||||
"description": "Leave this as true",
|
"description": "Leave this as true",
|
||||||
@@ -13,6 +13,15 @@
|
|||||||
"description": "The domain that your Mastodon instance will run on (this can be appname.herokuapp.com or a custom domain)",
|
"description": "The domain that your Mastodon instance will run on (this can be appname.herokuapp.com or a custom domain)",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
"LOCAL_HTTPS": {
|
||||||
|
"description": "Will your domain support HTTPS? (Automatic for herokuapp, requires manual configuration for custom domains)",
|
||||||
|
"value": "false",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"PAPERCLIP_SECRET": {
|
||||||
|
"description": "The secret key for storing media files",
|
||||||
|
"generator": "secret"
|
||||||
|
},
|
||||||
"SECRET_KEY_BASE": {
|
"SECRET_KEY_BASE": {
|
||||||
"description": "The secret key base",
|
"description": "The secret key base",
|
||||||
"generator": "secret"
|
"generator": "secret"
|
||||||
@@ -79,13 +88,8 @@
|
|||||||
"description": "SMTP server certificate verification mode. Defaults is 'peer'.",
|
"description": "SMTP server certificate verification mode. Defaults is 'peer'.",
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"SMTP_ENABLE_STARTTLS": {
|
|
||||||
"description": "Enable STARTTLS? Default is 'auto'.",
|
|
||||||
"value": "auto",
|
|
||||||
"required": false
|
|
||||||
},
|
|
||||||
"SMTP_ENABLE_STARTTLS_AUTO": {
|
"SMTP_ENABLE_STARTTLS_AUTO": {
|
||||||
"description": "Enable STARTTLS if SMTP server supports it? Deprecated by SMTP_ENABLE_STARTTLS.",
|
"description": "Enable STARTTLS if SMTP server supports it? Default is true.",
|
||||||
"required": false
|
"required": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -93,6 +97,9 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/heroku/heroku-buildpack-apt"
|
"url": "https://github.com/heroku/heroku-buildpack-apt"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"url": "heroku/nodejs"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"url": "heroku/ruby"
|
"url": "heroku/ruby"
|
||||||
}
|
}
|
||||||
@@ -100,5 +107,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"postdeploy": "bundle exec rails db:migrate && bundle exec rails db:seed"
|
"postdeploy": "bundle exec rails db:migrate && bundle exec rails db:seed"
|
||||||
},
|
},
|
||||||
"addons": ["heroku-postgresql", "heroku-redis"]
|
"addons": [
|
||||||
|
"heroku-postgresql",
|
||||||
|
"heroku-redis"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class AccountsIndex < Chewy::Index
|
|
||||||
include DatetimeClampingConcern
|
|
||||||
|
|
||||||
settings index: index_preset(refresh_interval: '30s'), analysis: {
|
|
||||||
filter: {
|
|
||||||
english_stop: {
|
|
||||||
type: 'stop',
|
|
||||||
stopwords: '_english_',
|
|
||||||
},
|
|
||||||
|
|
||||||
english_stemmer: {
|
|
||||||
type: 'stemmer',
|
|
||||||
language: 'english',
|
|
||||||
},
|
|
||||||
|
|
||||||
english_possessive_stemmer: {
|
|
||||||
type: 'stemmer',
|
|
||||||
language: 'possessive_english',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
analyzer: {
|
|
||||||
natural: {
|
|
||||||
tokenizer: 'standard',
|
|
||||||
filter: %w(
|
|
||||||
lowercase
|
|
||||||
asciifolding
|
|
||||||
cjk_width
|
|
||||||
elision
|
|
||||||
english_possessive_stemmer
|
|
||||||
english_stop
|
|
||||||
english_stemmer
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
verbatim: {
|
|
||||||
tokenizer: 'standard',
|
|
||||||
filter: %w(lowercase asciifolding cjk_width),
|
|
||||||
},
|
|
||||||
|
|
||||||
edge_ngram: {
|
|
||||||
tokenizer: 'edge_ngram',
|
|
||||||
filter: %w(lowercase asciifolding cjk_width),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
tokenizer: {
|
|
||||||
edge_ngram: {
|
|
||||||
type: 'edge_ngram',
|
|
||||||
min_gram: 1,
|
|
||||||
max_gram: 15,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
index_scope ::Account.searchable.includes(:account_stat)
|
|
||||||
|
|
||||||
root date_detection: false do
|
|
||||||
field(:id, type: 'long')
|
|
||||||
field(:following_count, type: 'long')
|
|
||||||
field(:followers_count, type: 'long')
|
|
||||||
field(:properties, type: 'keyword', value: ->(account) { account.searchable_properties })
|
|
||||||
field(:last_status_at, type: 'date', value: ->(account) { clamp_date(account.last_status_at || account.created_at) })
|
|
||||||
field(:display_name, type: 'text', analyzer: 'verbatim') { field :edge_ngram, type: 'text', analyzer: 'edge_ngram', search_analyzer: 'verbatim' }
|
|
||||||
field(:username, type: 'text', analyzer: 'verbatim', value: ->(account) { [account.username, account.domain].compact.join('@') }) { field :edge_ngram, type: 'text', analyzer: 'edge_ngram', search_analyzer: 'verbatim' }
|
|
||||||
field(:text, type: 'text', analyzer: 'verbatim', value: ->(account) { account.searchable_text }) { field :stemmed, type: 'text', analyzer: 'natural' }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module DatetimeClampingConcern
|
|
||||||
extend ActiveSupport::Concern
|
|
||||||
|
|
||||||
MIN_ISO8601_DATETIME = '0000-01-01T00:00:00Z'.to_datetime.freeze
|
|
||||||
MAX_ISO8601_DATETIME = '9999-12-31T23:59:59Z'.to_datetime.freeze
|
|
||||||
|
|
||||||
class_methods do
|
|
||||||
def clamp_date(datetime)
|
|
||||||
datetime.clamp(MIN_ISO8601_DATETIME, MAX_ISO8601_DATETIME)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class InstancesIndex < Chewy::Index
|
|
||||||
settings index: index_preset(refresh_interval: '30s')
|
|
||||||
|
|
||||||
index_scope ::Instance.searchable
|
|
||||||
|
|
||||||
root date_detection: false do
|
|
||||||
field :domain, type: 'text', index_prefixes: { min_chars: 1, max_chars: 5 }
|
|
||||||
field :accounts_count, type: 'long'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class PublicStatusesIndex < Chewy::Index
|
|
||||||
include DatetimeClampingConcern
|
|
||||||
|
|
||||||
settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: {
|
|
||||||
filter: {
|
|
||||||
english_stop: {
|
|
||||||
type: 'stop',
|
|
||||||
stopwords: '_english_',
|
|
||||||
},
|
|
||||||
|
|
||||||
english_stemmer: {
|
|
||||||
type: 'stemmer',
|
|
||||||
language: 'english',
|
|
||||||
},
|
|
||||||
|
|
||||||
english_possessive_stemmer: {
|
|
||||||
type: 'stemmer',
|
|
||||||
language: 'possessive_english',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
analyzer: {
|
|
||||||
verbatim: {
|
|
||||||
tokenizer: 'uax_url_email',
|
|
||||||
filter: %w(lowercase),
|
|
||||||
},
|
|
||||||
|
|
||||||
content: {
|
|
||||||
tokenizer: 'standard',
|
|
||||||
filter: %w(
|
|
||||||
lowercase
|
|
||||||
asciifolding
|
|
||||||
cjk_width
|
|
||||||
elision
|
|
||||||
english_possessive_stemmer
|
|
||||||
english_stop
|
|
||||||
english_stemmer
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
hashtag: {
|
|
||||||
tokenizer: 'keyword',
|
|
||||||
filter: %w(
|
|
||||||
word_delimiter_graph
|
|
||||||
lowercase
|
|
||||||
asciifolding
|
|
||||||
cjk_width
|
|
||||||
),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
index_scope ::Status.unscoped
|
|
||||||
.kept
|
|
||||||
.indexable
|
|
||||||
.includes(:media_attachments, :preloadable_poll, :tags, preview_cards_status: :preview_card)
|
|
||||||
|
|
||||||
root date_detection: false do
|
|
||||||
field(:id, type: 'long')
|
|
||||||
field(:account_id, type: 'long')
|
|
||||||
field(:text, type: 'text', analyzer: 'verbatim', value: ->(status) { status.searchable_text }) { field(:stemmed, type: 'text', analyzer: 'content') }
|
|
||||||
field(:tags, type: 'text', analyzer: 'hashtag', value: ->(status) { status.tags.map(&:display_name) })
|
|
||||||
field(:language, type: 'keyword')
|
|
||||||
field(:properties, type: 'keyword', value: ->(status) { status.searchable_properties })
|
|
||||||
field(:created_at, type: 'date', value: ->(status) { clamp_date(status.created_at) })
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,67 +1,61 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class StatusesIndex < Chewy::Index
|
class StatusesIndex < Chewy::Index
|
||||||
include DatetimeClampingConcern
|
settings index: { refresh_interval: '15m' }, analysis: {
|
||||||
|
|
||||||
settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: {
|
|
||||||
filter: {
|
filter: {
|
||||||
english_stop: {
|
english_stop: {
|
||||||
type: 'stop',
|
type: 'stop',
|
||||||
stopwords: '_english_',
|
stopwords: '_english_',
|
||||||
},
|
},
|
||||||
|
|
||||||
english_stemmer: {
|
english_stemmer: {
|
||||||
type: 'stemmer',
|
type: 'stemmer',
|
||||||
language: 'english',
|
language: 'english',
|
||||||
},
|
},
|
||||||
|
|
||||||
english_possessive_stemmer: {
|
english_possessive_stemmer: {
|
||||||
type: 'stemmer',
|
type: 'stemmer',
|
||||||
language: 'possessive_english',
|
language: 'possessive_english',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
analyzer: {
|
analyzer: {
|
||||||
verbatim: {
|
|
||||||
tokenizer: 'uax_url_email',
|
|
||||||
filter: %w(lowercase),
|
|
||||||
},
|
|
||||||
|
|
||||||
content: {
|
content: {
|
||||||
tokenizer: 'standard',
|
tokenizer: 'uax_url_email',
|
||||||
filter: %w(
|
filter: %w(
|
||||||
|
english_possessive_stemmer
|
||||||
lowercase
|
lowercase
|
||||||
asciifolding
|
asciifolding
|
||||||
cjk_width
|
cjk_width
|
||||||
elision
|
|
||||||
english_possessive_stemmer
|
|
||||||
english_stop
|
english_stop
|
||||||
english_stemmer
|
english_stemmer
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
hashtag: {
|
|
||||||
tokenizer: 'keyword',
|
|
||||||
filter: %w(
|
|
||||||
word_delimiter_graph
|
|
||||||
lowercase
|
|
||||||
asciifolding
|
|
||||||
cjk_width
|
|
||||||
),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
index_scope ::Status.unscoped.kept.without_reblogs.includes(:media_attachments, :local_mentioned, :local_favorited, :local_reblogged, :local_bookmarked, :tags, preview_cards_status: :preview_card, preloadable_poll: :local_voters), delete_if: ->(status) { status.searchable_by.empty? }
|
define_type ::Status.without_reblogs do
|
||||||
|
crutch :mentions do |collection|
|
||||||
|
data = ::Mention.where(status_id: collection.map(&:id)).pluck(:status_id, :account_id)
|
||||||
|
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
|
||||||
|
end
|
||||||
|
|
||||||
root date_detection: false do
|
crutch :favourites do |collection|
|
||||||
field(:id, type: 'long')
|
data = ::Favourite.where(status_id: collection.map(&:id)).pluck(:status_id, :account_id)
|
||||||
field(:account_id, type: 'long')
|
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
|
||||||
field(:text, type: 'text', analyzer: 'verbatim', value: ->(status) { status.searchable_text }) { field(:stemmed, type: 'text', analyzer: 'content') }
|
end
|
||||||
field(:tags, type: 'text', analyzer: 'hashtag', value: ->(status) { status.tags.map(&:display_name) })
|
|
||||||
field(:searchable_by, type: 'long', value: ->(status) { status.searchable_by })
|
crutch :reblogs do |collection|
|
||||||
field(:language, type: 'keyword')
|
data = ::Status.where(reblog_of_id: collection.map(&:id)).pluck(:reblog_of_id, :account_id)
|
||||||
field(:properties, type: 'keyword', value: ->(status) { status.searchable_properties })
|
data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }
|
||||||
field(:created_at, type: 'date', value: ->(status) { clamp_date(status.created_at) })
|
end
|
||||||
|
|
||||||
|
root date_detection: false do
|
||||||
|
field :account_id, type: 'long'
|
||||||
|
|
||||||
|
field :text, type: 'text', value: ->(status) { [status.spoiler_text, Formatter.instance.plaintext(status)].join("\n\n") } do
|
||||||
|
field :stemmed, type: 'text', analyzer: 'content'
|
||||||
|
end
|
||||||
|
|
||||||
|
field :searchable_by, type: 'long', value: ->(status, crutches) { status.searchable_by(crutches) }
|
||||||
|
field :created_at, type: 'date'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class TagsIndex < Chewy::Index
|
|
||||||
include DatetimeClampingConcern
|
|
||||||
|
|
||||||
settings index: index_preset(refresh_interval: '30s'), analysis: {
|
|
||||||
analyzer: {
|
|
||||||
content: {
|
|
||||||
tokenizer: 'keyword',
|
|
||||||
filter: %w(
|
|
||||||
word_delimiter_graph
|
|
||||||
lowercase
|
|
||||||
asciifolding
|
|
||||||
cjk_width
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
edge_ngram: {
|
|
||||||
tokenizer: 'edge_ngram',
|
|
||||||
filter: %w(
|
|
||||||
lowercase
|
|
||||||
asciifolding
|
|
||||||
cjk_width
|
|
||||||
),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
tokenizer: {
|
|
||||||
edge_ngram: {
|
|
||||||
type: 'edge_ngram',
|
|
||||||
min_gram: 2,
|
|
||||||
max_gram: 15,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
index_scope ::Tag.listable
|
|
||||||
|
|
||||||
crutch :time_period do
|
|
||||||
7.days.ago.to_date..0.days.ago.to_date
|
|
||||||
end
|
|
||||||
|
|
||||||
root date_detection: false do
|
|
||||||
field(:name, type: 'text', analyzer: 'content', value: :display_name) { field(:edge_ngram, type: 'text', analyzer: 'edge_ngram', search_analyzer: 'content') }
|
|
||||||
field(:reviewed, type: 'boolean', value: ->(tag) { tag.reviewed? })
|
|
||||||
field(:usage, type: 'long', value: ->(tag, crutches) { tag.history.aggregate(crutches.time_period).accounts })
|
|
||||||
field(:last_status_at, type: 'date', value: ->(tag) { clamp_date(tag.last_status_at || tag.created_at) })
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user