Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Rake task for blocking already reported users #43

Merged
merged 23 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
929488b
feat(job): Add BlockUsersJob
Quentinchampenois Oct 17, 2024
b3d51e7
feat(rake): Create new rake task
Quentinchampenois Oct 17, 2024
63ab89c
lint: Fix rubocop offenses
Quentinchampenois Oct 17, 2024
f974950
chore: Bump to 3.0.6
Quentinchampenois Oct 17, 2024
ae321c8
fix: Add README entry for new task
Quentinchampenois Oct 17, 2024
a69e450
refactor: Call method
Quentinchampenois Oct 17, 2024
7d2da3a
ci: Bump actions/upload-artifact to v3
Quentinchampenois Oct 17, 2024
db9b0c3
ci: Bump chromedriver
Quentinchampenois Oct 17, 2024
66c4a85
ci: Remove unnecessary assets compilation
Quentinchampenois Oct 17, 2024
0873896
revert: 'ci: Remove unnecessary assets compilation'
Quentinchampenois Oct 17, 2024
0a0ca23
fix: Add missing js dependencies
Quentinchampenois Oct 17, 2024
34a74e8
fix: Add graphql-ws dep
Quentinchampenois Oct 17, 2024
1bb44f9
fix: Missing yarn deps
Quentinchampenois Oct 17, 2024
aa6f419
fix: Set new decidim version
Quentinchampenois Oct 17, 2024
b550045
fix: Npm i
Quentinchampenois Oct 17, 2024
46b0225
fix: yarn install
Quentinchampenois Oct 17, 2024
03d3b73
fix: Bump decidim
Quentinchampenois Oct 17, 2024
3217e34
ci: Add x86_64 linux support
Quentinchampenois Oct 17, 2024
05dc113
ci: Add missing js deps...again...
Quentinchampenois Oct 17, 2024
e55028d
ci: Remove assets precompilation
Quentinchampenois Oct 17, 2024
f5b6b92
ci: Remove codecov
Quentinchampenois Oct 17, 2024
4f0720e
ci: Disable codecov
Quentinchampenois Oct 17, 2024
394420f
ci: Remove codecov
Quentinchampenois Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Add README entry for new task
Quentinchampenois committed Oct 17, 2024

Unverified

The email in this signature doesn’t match the committer email.
commit ae321c8253eb8a05425595c78e95f6a3a0cf234f
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -41,6 +41,13 @@ if you are using sidekiq scheduler you can use the following configuration:
queue: scheduled
```

### Block already marked users

If you want to block already marked users, you can use the following command:
```bash
bundle exec rake decidim:spam_detection:block_users
```

### Further configuration
list of env var, default value and their usage:
```
File renamed without changes.
19 changes: 19 additions & 0 deletions spec/lib/tasks/decidim_block_user_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

require "spec_helper"

describe "decidim:spam_detection:block_users", type: :task do
it "preloads the Rails environment" do
expect(task.prerequisites).to include "environment"
end

it "runs gracefully" do
expect { task.execute }.not_to raise_error
end

it "performs the job" do
expect(Decidim::SpamDetection::BlockUsersJob).to receive(:perform_later)

task.execute
end
end