Skip to content

Commit

Permalink
Merge branch 'glitch-soc-main' into merge-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Jul 19, 2024
2 parents bdea159 + d55ecf4 commit af24bf9
Show file tree
Hide file tree
Showing 385 changed files with 11,029 additions and 1,558 deletions.
6 changes: 3 additions & 3 deletions .env.production.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a sample configuration file. You can generate your configuration
# with the `rake mastodon:setup` interactive setup wizard, but to customize
# with the `bundle exec rails mastodon:setup` interactive setup wizard, but to customize
# your setup even further, you'll need to edit it manually. This sample does
# not demonstrate all available configuration options. Please look at
# https://docs.joinmastodon.org/admin/config/ for the full documentation.
Expand Down Expand Up @@ -68,15 +68,15 @@ DB_PORT=5432

# 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)
# Generate each with the `RAILS_ENV=production bundle exec rails secret` task (`docker-compose run --rm web bundle exec rails secret` if you use docker compose)
# -------
SECRET_KEY_BASE=
OTP_SECRET=


# Web Push
# --------
# Generate with `rake mastodon:webpush:generate_vapid_key` (first is the private key, second is the public one)
# Generate with `bundle exec rails 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
# be invalidated, requiring the users to access the website again to resubscribe.
# --------
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/bundler-audit.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Bundler Audit
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
branches:
- 'main'
- 'stable-*'
paths:
- 'Gemfile*'
- '.ruby-version'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Check i18n

on:
push:
branches: [main]
branches:
- 'main'
- 'stable-*'
pull_request:
branches: [main]
branches:
- 'main'
- 'stable-*'

env:
RAILS_ENV: test
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: 'CodeQL'

on:
merge_group:
push:
branches: ['main']
branches:
- 'main'
- 'stable-*'
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
branches:
- 'main'
- 'stable-*'
schedule:
- cron: '22 6 * * 1'

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/crowdin-upload.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Crowdin / Upload translations

on:
merge_group:
push:
branches:
- main
- 'main'
- 'stable-*'
paths:
- crowdin-glitch.yml
- app/javascript/flavours/glitch/locales/en.json
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Check formatting
on:
merge_group:
push:
branches:
- 'main'
- 'stable-*'
pull_request:

jobs:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lint-css.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: CSS Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'stable-*'
paths:
- 'package.json'
- 'yarn.lock'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lint-haml.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Haml Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'stable-*'
paths:
- '.github/workflows/haml-lint-problem-matcher.json'
- '.github/workflows/lint-haml.yml'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lint-js.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: JavaScript Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'stable-*'
paths:
- 'package.json'
- 'yarn.lock'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lint-ruby.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Ruby Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'stable-*'
paths:
- 'Gemfile*'
- '.rubocop*.yml'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: JavaScript Testing
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'stable-*'
paths:
- 'package.json'
- 'yarn.lock'
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/test-migrations.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: Historical data migration test

on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'stable-*'
paths:
- 'Gemfile*'
- '.ruby-version'
- '**/*.rb'
- '.github/workflows/test-migrations.yml'
- 'lib/tasks/tests.rake'

pull_request:
paths:
- 'Gemfile*'
- '.ruby-version'
- '**/*.rb'
- '.github/workflows/test-migrations.yml'
- 'lib/tasks/tests.rake'

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.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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Ruby Testing

on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'stable-*'
pull_request:

env:
Expand Down Expand Up @@ -223,7 +224,7 @@ jobs:
- name: Load database schema
run: './bin/rails db:create db:schema:load db:seed'

- run: bin/rspec --tag paperclip_processing
- run: bin/rspec --tag attachment_processing

- name: Upload coverage reports to Codecov
if: matrix.ruby-version == '.ruby-version'
Expand Down
4 changes: 2 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.64.1.
# using RuboCop version 1.65.0.
# 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
Expand All @@ -14,7 +14,7 @@ Lint/NonLocalExitFromIterator:
Metrics/AbcSize:
Max: 90

# Configuration parameters: CountBlocks, Max.
# Configuration parameters: CountBlocks, CountModifierForms, Max.
Metrics/BlockNesting:
Exclude:
- 'lib/tasks/mastodon.rake'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.3
3.3.4
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ You can contribute in the following ways:

If your contributions are accepted into Mastodon, you can request to be paid through [our OpenCollective](https://opencollective.com/mastodon).

Please review the org-level [contribution guidelines] for high-level acceptance
criteria guidance.

[contribution guidelines]: https://github.com/mastodon/.github/blob/main/CONTRIBUTING.md

## API Changes and Additions

Please note that any changes or additions made to the API should have an accompanying pull request on [our documentation repository](https://github.com/mastodon/documentation).
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG BUILDPLATFORM=${BUILDPLATFORM}

# Ruby image to use for base image, change with [--build-arg RUBY_VERSION="3.3.x"]
# renovate: datasource=docker depName=docker.io/ruby
ARG RUBY_VERSION="3.3.3"
ARG RUBY_VERSION="3.3.4"
# # Node version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="20"]
# renovate: datasource=node-version depName=node
ARG NODE_MAJOR_VERSION="20"
Expand Down Expand Up @@ -67,7 +67,9 @@ ENV \
# Optimize jemalloc 5.x performance
MALLOC_CONF="narenas:2,background_thread:true,thp:never,dirty_decay_ms:1000,muzzy_decay_ms:0" \
# Enable libvips, should not be changed
MASTODON_USE_LIBVIPS=true
MASTODON_USE_LIBVIPS=true \
# Sidekiq will touch tmp/sidekiq_process_has_started_and_will_begin_processing_jobs to indicate it is ready. This can be used for a readiness check in Kubernetes
MASTODON_SIDEKIQ_READY_FILENAME=sidekiq_process_has_started_and_will_begin_processing_jobs

# Set default shell used for running commands
SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-c"]
Expand Down
Loading

0 comments on commit af24bf9

Please sign in to comment.