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
Add !add command support #38
Conversation
Signed-off-by: Aadi Bajpai <me@aadibajpai.me>
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
==========================================
- Coverage 82.33% 80.36% -1.97%
==========================================
Files 3 3
Lines 419 433 +14
Branches 56 61 +5
==========================================
+ Hits 345 348 +3
- Misses 73 84 +11
Partials 1 1
Continue to review full report at Codecov.
|
@thealphadollar, this addresses one of the tracks. We were going to also add logging when creating the issues but the discord logger from last phase handles that beautifully so I talked to Willem and it'd be redundant to do it twice. I'll add tests later for the multiple PRs open here at the end of the phase. |
return json.dumps({'msg': 'Not relevant issue comment create; ignoring'}) | ||
|
||
comment = payload['comment'] | ||
if comment['user']['id'] == 27063113 and comment['author_association'] == 'MEMBER': # id of @aadibajpai |
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 possible, let's avoid the hardcoding of the member ID.
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.
what would you suggest? since the ID is permanent, I felt it would be okay to not use a variable here—later if we want to extend it we can just remove that whole condition and the MEMBER check would be enough.
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.
Makes sense to me :)
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.
LGTM.
Automates adding stripper for exceptional cases directly through the issue comment.
the checks are for the repo and user who made the comment, I also included member there in case later we want to allow all org members to add it.
Signed-off-by: Aadi Bajpai me@aadibajpai.me