This repository has been archived by the owner on Feb 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Add option --milestone to open_issue command #95
Closed
tarebyte
wants to merge
11
commits into
github-education-resources:master
from
tarebyte:add_milestone_option_to_open_issue
Closed
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
419a073
added option to include milestone on issue, no tests yet
tarebyte 7b2bf9b
only add milestone to the issue if it exists, fail the creation of th…
tarebyte c5fe543
convert hashes to string for body
tarebyte f6af4b4
convert body to string as well
tarebyte c92ea82
parse string back into JSON
tarebyte 720cba8
retry
tarebyte d964df7
undo changes to other files
tarebyte dd60ad6
convert returns to string
tarebyte b4da552
symbolize keys
tarebyte f99aea2
refactor for clarity and functionality
tarebyte 4019073
update milestone detection to fit ClientDecorator Pattern
tarebyte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,8 @@ def stub_owners_only | |
student_usernames.each_with_index do |student, i| | ||
# Creates team | ||
request_stubs << stub_request(:post, 'https://testteacher:[email protected]/orgs/testorg/teams'). | ||
with(body: { | ||
name: student, | ||
permission: 'push' | ||
}.to_json).to_return(body: { | ||
id: i, | ||
name: student | ||
}) | ||
with(body: "{\"name\":\"#{student}\",\"permission\":\"push\"}"). | ||
to_return(body: "{\"id\":#{i},\"name\":\"#{student}\"}") | ||
|
||
# Checks for existing team members | ||
# TODO No need to retrieve members for a new team | ||
|
@@ -56,13 +51,8 @@ def stub_owners_only | |
|
||
# Creates team | ||
request_stubs << stub_request(:post, 'https://testteacher:[email protected]/orgs/testorg/teams'). | ||
with(body: { | ||
name: 'studentteam1', | ||
permission: 'push' | ||
}.to_json).to_return(body: { | ||
id: 1, | ||
name: 'studentteam1' | ||
}) | ||
with(body: "{\"name\":\"studentteam1\",\"permission\":\"push\"}"). | ||
to_return(body: "{\"id\":1,\"name\":\"studentteam1\"}") | ||
|
||
# Checks for existing team members | ||
# TODO No need to retrieve members for a new team | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For some reason the CI breaks when all I add is this optionhttps://travis-ci.org/tarebyte/teachers_pet/jobs/40206454Update: I created a bug elsewhere and didn't realize it. This is no longer true
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.
Where would someone find the milestone "number"? Doesn't seem that it's reflected in the URL, e.g. https://github.com/scala/scala/milestones/on-hold.
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 don't see anywhere in the UI or the URL where the milestones are listed, maybe I'm missing something.
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 trying to move away from prompts, but one solution would be that if they include
--milestone
without a value, it could list the milestones for the repository and ask them to choose which to use.This leads to another question, which is how would the milestones get created across the repositories in the first place. Do we need an
create_milestone
command? This feels like 🐢s all the way down, and while I appreciate all the work you've put into this, I'm questioning the value relative to this extra required effort.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's not a problem, if nothing else I had good learning experience out of it, and I can extract out the json code I wrote and make that into a new PR 😃.
I don't know how often educators use milestones in students repos. My guess would be not very often. Just by talking to educators the last few days it seems like it's a very rare case.