Skip to content

Commit

Permalink
Merge upstream (#14)
Browse files Browse the repository at this point in the history
* Skip double building on Dependabot branches (mastodon#24025)

* Bump pg from 1.4.5 to 1.4.6 (mastodon#24001)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump yargs from 17.7.0 to 17.7.1 (mastodon#24002)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sidekiq-scheduler from 5.0.1 to 5.0.2 (mastodon#24004)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rack from 2.2.6.2 to 2.2.6.3 (mastodon#23997)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump axios from 1.3.3 to 1.3.4 (mastodon#23996)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump utf-8-validate from 6.0.2 to 6.0.3 (mastodon#23992)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump omniauth_openid_connect from 0.6.0 to 0.6.1 (mastodon#23991)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump doorkeeper from 5.6.4 to 5.6.5 (mastodon#24009)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jest from 29.4.3 to 29.5.0 (mastodon#24003)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jest-environment-jsdom from 29.4.3 to 29.5.0 (mastodon#23998)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rubocop from 1.45.1 to 1.48.0 (mastodon#23999)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mkdirp from 2.1.3 to 2.1.5 (mastodon#23994)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump babel-jest from 29.4.3 to 29.5.0 (mastodon#24007)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add refreshing many accounts at once with "tootctl accounts refresh" (mastodon#23304)

* Skip rebase-needed job for i10n branch (mastodon#24026)

* Unescape HTML entities (mastodon#24019)

* Explicitly set github repo in instance presenter spec (mastodon#24036)

* Center the text itself in upload area (mastodon#24029)

* Sync CI and Docker Compose image versions (mastodon#24053)

* Bump puma from 6.1.0 to 6.1.1 (mastodon#24045)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Serializers spec coverage (mastodon#24017)

* Coverage improvement round-out following up previous work (mastodon#23987)

* Bump pghero from 3.1.0 to 3.2.0 (mastodon#24044)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint from 8.33.0 to 8.35.0 (mastodon#24049)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Enable RSpec/FilePath (mastodon#23965)

* Add basic search specs for chewy indexes (mastodon#24065)

* Fix sidekiq jobs not triggering Elasticsearch index updates (mastodon#24046)

* Enable Rubocop Performance/DeleteSuffix (mastodon#24077)

* Prefer the stored location as after_sign_in_path in Omniauth Callback Controller (mastodon#24073)

* Bump jsdom from 21.1.0 to 21.1.1 (mastodon#24090)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pghero from 3.2.0 to 3.3.0 (mastodon#24085)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Support the PROXY protocol through the PROXY_PROTO_V1 env variable (mastodon#24064)

* Bump rack from 2.2.6.3 to 2.2.6.4 (mastodon#24097)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rails from 6.1.7.2 to 6.1.7.3 (mastodon#24096)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rubocop from 1.48.0 to 1.48.1 (mastodon#24095)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Push Docker images to Github Container Registry as well (mastodon#24101)

* Skip Docker CI Login/Push on forks (mastodon#23564)

* Change sidekiq-bulk's batch size from 10,000 to 1,000 jobs in one Redis call (mastodon#24034)

* Redirect users to SLO at the IdP after logging them out of Mastodon. (mastodon#24020)

* Add spec for the CLI `version` task (mastodon#23978)

* Update PostCSS dependencies (mastodon#23835)

* Fix dashboard crash on ElasticSearch server error (mastodon#23751)

* Fix incorrect post links in strikes when the account is remote (mastodon#23611)

* Fix misleading error code when receiving invalid WebAuthn credentials (mastodon#23568)

* Setup haml-lint CI with todo config (mastodon#23524)

* Use Github Container Registry as the official container image source (mastodon#24113)

* Skip pushing containers on forks (mastodon#24106)

* Fix more haml-lint Rubocop (mastodon#24107)

* Autofix Rubocop Style/PreferredHashMethods (mastodon#23851)

* Bump rack-test from 2.0.2 to 2.1.0 (mastodon#24112)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Autofix Rubocop Style/RedundantArgument (mastodon#23798)

* Bump immutable from 4.2.4 to 4.3.0 (mastodon#24088)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/eslint-parser from 7.19.1 to 7.21.3 (mastodon#24109)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint from 8.35.0 to 8.36.0 (mastodon#24089)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove `bullet` and `active_record_query_trace` gems (mastodon#24121)

* Add `SENDFILE_HEADER` environment variable (mastodon#24123)

* Bump @babel/core from 7.21.0 to 7.21.3 (mastodon#24111)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add cache headers to static files served through Rails (mastodon#24120)

* Bump autoprefixer from 10.4.13 to 10.4.14 (mastodon#24108)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sass from 1.58.3 to 1.59.3 (mastodon#24105)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Regen rubocop-todo without Max shadowing (mastodon#24076)

* Refactor monkey-patching of `PrivateAddressCheck` (mastodon#24122)

* Replace `Status#translatable?` with language matrix in separate endpoint (mastodon#24037)

* New Crowdin updates (mastodon#23904)

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

* Roll back unintentionally activated rubocop rules (mastodon#24132)

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Nick Schonning <nschonni@gmail.com>

* Change user backups to use expiring URLs for download when possible (mastodon#24136)

* Add warning for object storage misconfiguration (mastodon#24137)

* Ignore additional Style/OptionalBooleanParameter (mastodon#24138)

* Bump glob from 8.1.0 to 9.3.0 (mastodon#24110)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rimraf from 4.1.2 to 4.4.0 (mastodon#24048)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Link to the Identity provider's account settings from the account settings (mastodon#24100)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Include config/ and update all rubcop deps (mastodon#23963)

* Workaround the ActiveRecord / Marshal serialization bug on Ruby 3.2 (mastodon#24142)

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>

* Dedupe yarn.lock with yarn-deduplicate (mastodon#24119)

* Revert "Dedupe yarn.lock with yarn-deduplicate" (mastodon#24155)

* Upgrade redis-node to latest (mastodon#24154)

* Webhooks for local status.create, status.update, account.update (mastodon#24133)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Nick Schonning <nschonni@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: 9p4 <vcs@ersei.net>
Co-authored-by: Christian Schmidt <github@chsc.dk>
Co-authored-by: Matt Jankowski <matt@jankowski.online>
Co-authored-by: Rodion Borisov <vintprox@gmail.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: CSDUMMI <31551856+CSDUMMI@users.noreply.github.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
Co-authored-by: Jean byroot Boussier <jean.boussier+github@shopify.com>
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Vyr Cossont <VyrCossont@users.noreply.github.com>
  • Loading branch information
15 people committed Mar 20, 2023
1 parent 4ee5693 commit b6b9810
Show file tree
Hide file tree
Showing 353 changed files with 8,742 additions and 3,501 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Expand Up @@ -41,7 +41,7 @@ services:
- internal_network

redis:
image: redis:6-alpine
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis-data:/data
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/build-image.yml
Expand Up @@ -12,6 +12,7 @@ on:
- Dockerfile
permissions:
contents: read
packages: write

jobs:
build-image:
Expand All @@ -26,29 +27,44 @@ jobs:
- uses: hadolint/hadolint-action@v3.1.0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: github.event_name != 'pull_request'
if: github.repository == 'mastodon/mastodon' && github.event_name != 'pull_request'

- name: Log in to the Github Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.repository == 'mastodon/mastodon' && github.event_name != 'pull_request'

- uses: docker/metadata-action@v4
id: meta
with:
images: tootsuite/mastodon
images: |
tootsuite/mastodon
ghcr.io/mastodon/mastodon
flavor: |
latest=auto
tags: |
type=edge,branch=main
type=pep440,pattern={{raw}}
type=pep440,pattern=v{{major}}.{{minor}}
type=ref,event=pr
- uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
provenance: false
builder: ${{ steps.buildx.outputs.name }}
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.repository == 'mastodon/mastodon' && github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
17 changes: 17 additions & 0 deletions .github/workflows/haml-lint-problem-matcher.json
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "haml-lint",
"severity": "warning",
"pattern": [
{
"regexp": "^(.*):(\\d+)\\s\\[W]\\s(.*):\\s(.*)$",
"file": 1,
"line": 2,
"code": 3,
"message": 4
}
]
}
]
}
44 changes: 44 additions & 0 deletions .github/workflows/lint-haml.yml
@@ -0,0 +1,44 @@
name: Haml Linting
on:
push:
branches-ignore:
- 'dependabot/**'
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@v3

- name: Install native Ruby dependencies
run: sudo apt-get install -y libicu-dev libidn11-dev

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Run haml-lint
run: |
echo "::add-matcher::.github/workflows/haml-lint-problem-matcher.json"
bundle exec haml-lint
6 changes: 6 additions & 0 deletions .github/workflows/rebase-needed.yml
Expand Up @@ -2,7 +2,13 @@ name: PR Needs Rebase

on:
push:
branches-ignore:
- 'dependabot/**'
- 'l10n_main'
pull_request_target:
branches-ignore:
- 'dependabot/**'
- 'l10n_main'
types: [synchronize]

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-migrations-one-step.yml
Expand Up @@ -25,7 +25,7 @@ jobs:

services:
postgres:
image: postgres:14.5
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand All @@ -38,7 +38,7 @@ jobs:
- 5432:5432

redis:
image: redis:7.0
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-migrations-two-step.yml
Expand Up @@ -25,7 +25,7 @@ jobs:

services:
postgres:
image: postgres:14.5
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand All @@ -37,7 +37,7 @@ jobs:
ports:
- 5432:5432
redis:
image: redis:7.0
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-ruby.yml
Expand Up @@ -2,6 +2,8 @@ name: Ruby Testing

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:

env:
Expand Down Expand Up @@ -61,7 +63,7 @@ jobs:

services:
postgres:
image: postgres:14.5
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand All @@ -74,7 +76,7 @@ jobs:
- 5432:5432

redis:
image: redis:7.0
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
Expand Down
103 changes: 2 additions & 101 deletions .haml-lint.yml
@@ -1,108 +1,9 @@
# Whether to ignore frontmatter at the beginning of HAML documents for
# frameworks such as Jekyll/Middleman
skip_frontmatter: false
inherits_from: .haml-lint_todo.yml

exclude:
- 'vendor/**/*'
- 'spec/**/*'
- 'lib/templates/**/*'
- 'app/views/kaminari/**/*'
- lib/templates/haml/scaffold/_form.html.haml

linters:
AltText:
enabled: false

ClassAttributeWithStaticValue:
enabled: true

ClassesBeforeIds:
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:
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

0 comments on commit b6b9810

Please sign in to comment.