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

allows bounty URLs to be blocked #5430

Merged
merged 11 commits into from
Nov 20, 2019
Merged

allows bounty URLs to be blocked #5430

merged 11 commits into from
Nov 20, 2019

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Oct 30, 2019

Description

allows bounty URLs to be blocked

Refers/Fixes

see #product-feedback ; this is a user request

Testing

tested locally

@ddevault
Copy link

Thanks! Seems like this is missing server-side blacklisting, though. Client side validation is the same as no validation, in practice.

@owocki
Copy link
Contributor Author

owocki commented Oct 30, 2019

Thanks! Seems like this is missing server-side blacklisting, though. Client side validation is the same as no validation, in practice.

fair! let me see what i can cludge into the backend quickly.

@codecov
Copy link

codecov bot commented Oct 30, 2019

Codecov Report

Merging #5430 into master will increase coverage by 0.01%.
The diff coverage is 72.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5430      +/-   ##
==========================================
+ Coverage   30.22%   30.24%   +0.01%     
==========================================
  Files         247      247              
  Lines       21036    21048      +12     
  Branches     3032     3034       +2     
==========================================
+ Hits         6358     6365       +7     
- Misses      14399    14404       +5     
  Partials      279      279
Impacted Files Coverage Δ
app/app/redis_service.py 90% <ø> (ø) ⬆️
app/dashboard/views.py 12.79% <0%> (-0.01%) ⬇️
app/chat/views.py 57.14% <100%> (ø) ⬆️
app/taskapp/celery.py 93.33% <100%> (ø) ⬆️
app/dashboard/admin.py 62.73% <100%> (+0.14%) ⬆️
app/dashboard/tasks.py 50% <100%> (ø) ⬆️
app/app/urls.py 90.19% <100%> (ø) ⬆️
app/dashboard/helpers.py 14.48% <40%> (+0.29%) ⬆️
app/dashboard/models.py 56.19% <80%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b308659...98ac026. Read the comment docs.

Copy link
Contributor

@octavioamu octavioamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just left a comment about a non related migration. Removing that, looks good to merge.

@@ -0,0 +1,23 @@
# Generated by Django 2.2.3 on 2019-10-30 21:03
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me this doesn't belong here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@owocki
Copy link
Contributor Author

owocki commented Nov 5, 2019

any feedback @danlipert ? gonna merge soon

@@ -462,6 +462,15 @@ $('#sync-issue').on('click', function(event) {
});

$('#issueURL').focusout(function() {
for (var i = 0; i <= document.blocked_urls.length; i++) {
var this_url_filter = document.blocked_urls[i];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let / const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -462,6 +462,15 @@ $('#sync-issue').on('click', function(event) {
});

$('#issueURL').focusout(function() {
for (var i = 0; i <= document.blocked_urls.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let / const

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we wanna add a document.blocked_urls check ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let / const

i increments; why would i want to make it a constant?

document.blocked_urls

no.. itll always exist

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i increments; why would i want to make it a constant?

aka let to avoid hoisting it :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about hoisting.. committing a few now

var this_url_filter = document.blocked_urls[i];

if ($('input[name=issueURL]').val().toLowerCase().indexOf(this_url_filter.toLowerCase()) != -1) {
alert('this repo is not bountyable at the request of the maintainer.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use _alert ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@danlipert
Copy link
Contributor

@owocki are you going to add the backend check in this branch?

@owocki
Copy link
Contributor Author

owocki commented Nov 6, 2019

@danlipert wont be able to do so before todays release.. i'd say, if we think this looks ok on the frontend, lets get it into todays release -- and i will add a note to create a hard-backend-exception as a hotfix or in next weeks release.

@owocki
Copy link
Contributor Author

owocki commented Nov 6, 2019

@danlipert @thelostone-mc fc8db60 addresses ur feedabcks

@thelostone-mc thelostone-mc changed the base branch from stable to master November 20, 2019 14:40
Copy link
Contributor

@octavioamu octavioamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think still problems on migrations since show hackathon exist

@octavioamu octavioamu merged commit d4d24a3 into master Nov 20, 2019
@thelostone-mc thelostone-mc deleted the blockedurls branch June 27, 2020 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants