-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
GH integration and express interest #156
Conversation
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
+ Coverage 12.21% 13.74% +1.53%
==========================================
Files 66 67 +1
Lines 3120 3282 +162
Branches 343 366 +23
==========================================
+ Hits 381 451 +70
- Misses 2739 2831 +92
Continue to review full report at Codecov.
|
good progress! submitting my comments now |
@@ -92,6 +92,7 @@ GITHUB_CLIENT_ID = 'TODO' | |||
GITHUB_CLIENT_SECRET = 'TODO' | |||
GITHUB_API_USER = 'TODO' | |||
GITHUB_API_TOKEN = 'TODO' | |||
GITHUB_APP_NAME = 'TODO' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GITHUB_API_BASE_URL
GITHUB_SCOPE
these should probably go in the .dist, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GITHUB_APP_NAME too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was considering GITHUB_SCOPE
, GITHUB_API_BASE_URL
, and GITHUB_TOKEN_URL
to be more repo specific than local dev specific. Realistically, I could eliminate the api/token urls since they shouldn't change. Scope would only change if the project as a whole was changing to require more permissions from the user (so a dev would want to commit that change in order to allow any added functionality to work for everyone). Do you want me to move them?
} else { | ||
var entry = { | ||
href: '/interested', | ||
text: 'Express Interest', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like if i am not authenticated, this (and remove interest above) should present the user with a dialog asking them to login, no? http://bits.owocki.com/3z0K3v0r3c1c/Screen%20Recording%202017-12-22%20at%2012.26%20PM.gif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! I'll push a fix for this shortly.
@@ -337,12 +340,30 @@ window.addEventListener('load', function() { | |||
actions.push(entry); | |||
if(result['status']=='open' && !isBountyOwner(result) ){ | |||
var entry = { | |||
href: '/funding/claim?source='+result['github_url'], | |||
href: '/_github/auth?redirect_uri=/funding/claim?source=' + result['github_url'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be great if the username was prefilled after i got to this page http://bits.owocki.com/2M3U3m3n0k29/Screen%20Shot%202017-12-22%20at%2012.32.53%20PM.png
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(claim page)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an oversight on my part. I'll add that.
var entry = { | ||
href: '/uninterested', | ||
text: 'Remove Interest', | ||
parent: 'right_actions', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two things
- it'd be great if 'interested profiles updated AJAX'ily when i added / removed my interest
- not sure how much thought was put into the design here.. ( i can ask someone who does design to look into it if we want).. but maybe for now we can just remove the list bullet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I didn't add any method of updating the view with the current user after they express interest... Sorry about that.
return 'https://api.github.com/repos/' + url_path | ||
|
||
def fetch_issue_item(self, item_type='body'): | ||
"""Fetch the item type of an issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice little refactor :)
@@ -75,6 +75,22 @@ <h5>Claimee Info</h5> | |||
Github Profile: <span id="claimee_github_username"></span> | |||
|
|||
</div> | |||
<div id="interest_list"> | |||
<br> | |||
<h5>Interested Profiles</h5> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we ever decide to do this with javascript, theres some examples if you search text/x-jsrender
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. I tend to drink the django kool-aid when it comes to handling data interaction with the template.
@@ -55,11 +55,11 @@ <h1>Send Tip.</h1> | |||
</div> | |||
<div> | |||
From Name (optional): | |||
<input type="text" placeholder="Bobby Tables" id="fromName" value="" style="width: 400px; margin-left: auto; margin-right: auto;"> | |||
<input type="text" placeholder="Bobby Tables" id="fromName" value="{% if from_handle %}{{ from_handle }}{% endif %}" style="width: 400px; margin-left: auto; margin-right: auto;"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strangely enough.. i cant get this information to prepopulate after i auth with github.. wonder what im doing wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look when I'm going the refactor and include setup steps/gifs of functionality.
@@ -40,8 +44,53 @@ | |||
confirm_time_minutes_target = 3 | |||
|
|||
|
|||
def send_tip(request): | |||
@require_GET | |||
def github_callback(request): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i haven't been horribly consistent about this myself... so take with a grain of salt.. but it could be worht moving all the github auth views into their own view file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I originally added an app specifically for this, but figured it should conform to the rest of the project for the moment. 😂 I'll move it over to it's own app.
donno if you're on the grid this week (some are, some arent) so no pressure if not.. but im antsy to see this move forward! let me know when to expect another pass |
@owocki The holidays have set me back on this a bit. Mostly been keeping updated on GH from my phone, but I should have the updates in today. I'll ping you once they're in. |
kk np |
happy new year! let me know what your new schedule looks like here... also, mind resolving the merge conflcits? |
@owocki thanks for sharing the link in the Slack Want to join the discussion and open up the possibility of using uPort and self-sovereign identity systems as the consistent identifier within the Gitcoin ecosystem. Additionally, we could have participants "attest" to their Github account, make a clear link between self-sovereign identity and third-parties (github, twitter, etc...), but still maintaining a decentralized foundation. The added benefit of using uPort might be easily associated wallet address, verifiable voting capabilities, and additional features like badges and accomplishments. |
its something we should consider.. but is probably out of scope of this PR @kamescg -- could you start another issue and lets discuss what youre thinking!? |
per https://gitcoincommunity.slack.com/archives/C7A4F4UHK/p1515876720000097 i wonder if we should rename 'express interest' into claim work and the current claim functionality to 'claim funds'. Claim Work: you’ve claimed it and going to do it |
closing this as it's been moved over to |
hey @mbeacom it looks like most of my feedback above isnt turned around.. do you want to move it over to https://github.com/gitcoinco/web/projects/1 or just turn it around on the new branch? |
@owocki I moved the remaining issues over to the project yesterday evening. I'll move any additional notes on the new PR over to GH project cards. |
Description
The goal of this PR is to provide rough github integration to validate
Profile
handles and email addresses to ensure we have a valid email address to send tips/notifications. Additionally, this PR implementsExpress Interest
functionality that will add users to a list of users that have expressed interest (displayed on the bounty page) and comments on the github issue with a list of user handles and links back to their gitcoin profile pages.Checklist
Affected core subsystem(s)
Tips and Bounties
Refers/Fixes
Ref: #62
Ref: #98