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 functionality to set the issue/PR assignees #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adrn
Copy link
Contributor

@adrn adrn commented Jun 19, 2019

This adds methods to add an assignee or set the assignees for an issue or pull request.

I guess this is a work in progress, because I haven't tested it, so I'm not even sure it works :)! Any ideas on how to test this?

cc @astrofrog @pllim @Cadair

@pllim
Copy link
Contributor

pllim commented Jun 19, 2019

add_assignees can be easily tested, but I don't see how we can test set_assignees meaningfully with mock. We might have to #yolo that one.

Also, please fix PEP 8:

/home/travis/build/OpenAstronomy/baldrick/baldrick/github/github_api.py:455:39: E261 at least two spaces before inline comment

@codecov-io
Copy link

codecov-io commented Jun 19, 2019

Codecov Report

Merging #76 into master will decrease coverage by 0.57%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   82.72%   82.15%   -0.58%     
==========================================
  Files          16       16              
  Lines         799      807       +8     
==========================================
+ Hits          661      663       +2     
- Misses        138      144       +6
Impacted Files Coverage Δ
baldrick/github/github_api.py 63.97% <25%> (-1%) ⬇️

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 b467c7d...b5560f7. Read the comment docs.

@astrofrog
Copy link
Collaborator

astrofrog commented Jun 19, 2019

To try out things that require authentication, see https://baldrick.readthedocs.io/en/latest/local.html - however this requires secret keys that we can't easily all share. I'll try it out for now.

@astrofrog
Copy link
Collaborator

I pushed a small fix to the URL, but otherwise the main issue is that the bot can only assign users to issues/PRs if we give it push access to the repo... Too much power?

@pllim
Copy link
Contributor

pllim commented Jun 20, 2019

give it push access to the repo

That is scary... What if the bot squash all commits in master into one commit? 😱 Can we give it really limited push access; like it can label issues but cannot modify code, something like that?

@bsipocz
Copy link
Member

bsipocz commented Jun 20, 2019

can you give a "triaging" level access to the bot? After all it exists for exactly similar use cases (though it's for users, so may not yet be applicable for bots?)

@astrofrog astrofrog self-assigned this Jun 20, 2019
@astrofrog
Copy link
Collaborator

I'll investigate the triaging option

@astrofrog astrofrog removed their assignment Oct 24, 2023
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