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

Action URLS Cleanup (and other goodies) #983

Merged
merged 16 commits into from
Apr 26, 2018
Merged

Action URLS Cleanup (and other goodies) #983

merged 16 commits into from
Apr 26, 2018

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Apr 25, 2018

Description

This PR

  • cleans up the long action urls that we used to have for increase, cancel, fulfill, process, bounty
  • allows more than one bounty per github URL
  • adds some handling for IFF there is more than one bounty per network per github url.
  • adds some checks around which network you are on on the action urls
Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

ui, bounty

Testing

tested it end to end

Refers/Fixes

#533

@owocki owocki changed the title Action URLS Cleanup Action URLS Cleanup (and other goodies) Apr 25, 2018
Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

# Interests
path('actions/bounty/<int:bounty_id>/interest/new/', dashboard.views.new_interest, name='express-interest'),
path('actions/bounty/<int:bounty_id>/interest/remove/', dashboard.views.remove_interest, name='remove-interest'),
path('actions/bounty/<int:bounty_id>/interest/<int:profile_id>/uninterested/', dashboard.views.uninterested, name='uninterested'),

Choose a reason for hiding this comment

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

E501 line too long (134 > 120 characters)

@@ -493,11 +478,39 @@ def new_bounty(request):
return TemplateResponse(request, 'submit_bounty.html', params)


def fulfill_bounty(request):

def accept_bounty(request, pk):

Choose a reason for hiding this comment

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

E303 too many blank lines (3)

@codecov
Copy link

codecov bot commented Apr 25, 2018

Codecov Report

Merging #983 into master will decrease coverage by 0.01%.
The diff coverage is 20.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #983      +/-   ##
==========================================
- Coverage   32.85%   32.83%   -0.02%     
==========================================
  Files         100      100              
  Lines        6614     6621       +7     
  Branches      809      808       -1     
==========================================
+ Hits         2173     2174       +1     
- Misses       4332     4338       +6     
  Partials      109      109
Impacted Files Coverage Δ
app/app/urls.py 93.54% <ø> (ø) ⬆️
app/dashboard/router.py 38.15% <ø> (ø) ⬆️
app/legacy/urls.py 100% <100%> (ø) ⬆️
app/dashboard/views.py 15.82% <15.38%> (-0.17%) ⬇️
app/dashboard/models.py 64.1% <50%> (-0.04%) ⬇️

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 533af63...c4c52af. Read the comment docs.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

issue_url = request.GET.get('source')
def increase_bounty(request, pk):
"""Increase a bounty as the funder.

Choose a reason for hiding this comment

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

W293 blank line contains whitespace


Returns:
TemplateResponse: The increase bounty view.

Choose a reason for hiding this comment

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

W293 blank line contains whitespace

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

def fulfill_bounty(request):
"""Fulfill a bounty."""

def accept_bounty(request, pk):

Choose a reason for hiding this comment

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

E303 too many blank lines (3)

Copy link
Member

@thelostone-mc thelostone-mc left a comment

Choose a reason for hiding this comment

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

Yay !!

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link
Contributor

@mbeacom mbeacom left a comment

Choose a reason for hiding this comment

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

Overall, lgtm.

Made a few changes:

  • docstrings to reflected the updates and conform to pep-257/258.
  • url entries being moved around to use the current django methods: re_path versus url
  • bare except to except Bounty.DoesNotExist to pass flake8 E722

We might want to hold off on merging this until we have pytest/travis in a passing state, though!

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

Copy link

@stickler-ci stickler-ci left a comment

Choose a reason for hiding this comment

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

Your eslint configuration output the following error:

ESLint couldn't find the plugin "eslint-plugin-html". This can happen for a couple different reasons:

The above plugin is not installed.

@owocki
Copy link
Contributor Author

owocki commented Apr 26, 2018

buidl passed!

@owocki owocki merged commit 16d5153 into master Apr 26, 2018
@mbeacom mbeacom deleted the kevin/action_urls branch April 27, 2018 00:01
mbeacom added a commit that referenced this pull request Apr 27, 2018
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.

4 participants