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

Add !add command support #38

Merged
merged 1 commit into from Jul 27, 2020
Merged

Add !add command support #38

merged 1 commit into from Jul 27, 2020

Conversation

aadibajpai
Copy link
Member

@aadibajpai aadibajpai commented Jul 25, 2020

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

Signed-off-by: Aadi Bajpai <me@aadibajpai.me>
@aadibajpai aadibajpai requested a review from flabbet July 25, 2020 08:26
@codecov
Copy link

codecov bot commented Jul 25, 2020

Codecov Report

Merging #38 into master will decrease coverage by 1.96%.
The diff coverage is 31.57%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
swaglyrics_backend/issue_maker.py 83.09% <31.57%> (-2.63%) ⬇️

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 71b8c4c...4adf15c. Read the comment docs.

@aadibajpai aadibajpai marked this pull request as ready for review July 26, 2020 00:13
@aadibajpai
Copy link
Member Author

@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

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.

Copy link
Member Author

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.

Choose a reason for hiding this comment

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

Makes sense to me :)

Copy link

@thealphadollar thealphadollar left a comment

Choose a reason for hiding this comment

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

LGTM.

@aadibajpai aadibajpai merged commit 22aad24 into master Jul 27, 2020
@aadibajpai aadibajpai deleted the automate branch December 30, 2020 15:32
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.

None yet

2 participants