You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by revans2 <gi...@git.apache.org> on 2014/05/15 19:41:39 UTC

[GitHub] incubator-storm pull request: [STROM-321] Added a tool to see the ...

GitHub user revans2 opened a pull request:

    https://github.com/apache/incubator-storm/pull/116

    [STROM-321] Added a tool to see the current status of STORM JIRA and github pulls.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/revans2/incubator-storm jira-github-join

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-storm/pull/116.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #116
    
----
commit b50beb7cfa522b8773b0e79aa600c323e8c504d8
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Date:   2014-05-15T17:36:37Z

    Added a tool to see the current status of STORM JIRA and github pulls.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-storm pull request: [STORM-321] Added a tool to see the ...

Posted by revans2 <gi...@git.apache.org>.
Github user revans2 commented on the pull request:

    https://github.com/apache/incubator-storm/pull/116#issuecomment-48731520
  
    I addressed the review comments and added in some headers so users don't have to read the code to know what they are looking at.  It is still far from perfect, but I think it is useful.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-storm pull request: [STORM-321] Added a tool to see the ...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on the pull request:

    https://github.com/apache/incubator-storm/pull/116#issuecomment-46616527
  
    I tried this out, and it seems useful.
    
    I am +1 for merging this in.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-storm pull request: [STORM-321] Added a tool to see the ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-storm/pull/116


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-storm pull request: [STORM-321] Added a tool to see the ...

Posted by ptgoetz <gi...@git.apache.org>.
Github user ptgoetz commented on the pull request:

    https://github.com/apache/incubator-storm/pull/116#issuecomment-49955637
  
    +1
    
    Definitely useful. I have a few utilities as well that I can probably offer up as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-storm pull request: [STORM-321] Added a tool to see the ...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on a diff in the pull request:

    https://github.com/apache/incubator-storm/pull/116#discussion_r14794451
  
    --- Diff: dev-tools/jira-github-join.py ---
    @@ -0,0 +1,74 @@
    +#!/usr/bin/python
    +# -*- coding: utf-8 -*-
    +#  Licensed under the Apache License, Version 2.0 (the "License");
    +#  you may not use this file except in compliance with the License.
    +#  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +#  Unless required by applicable law or agreed to in writing, software
    +#  distributed under the License is distributed on an "AS IS" BASIS,
    +#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +#  See the License for the specific language governing permissions and
    +#  limitations under the License.
    +
    +from jira import JiraRepo
    +from github import GitHub, mstr
    +import re
    +from optparse import OptionParser
    +from datetime import datetime
    +
    +def daydiff(a, b):
    +	return (a - b).days
    +
    +def main():
    +	parser = OptionParser(usage="usage: %prog [options]")
    +	parser.add_option("-g", "--github-user", dest="gituser",
    +			type="string", help="github user, if not supplied no auth is used", metavar="USER")
    +	
    +	(options, args) = parser.parse_args()
    +	
    +	jrepo = JiraRepo("https://issues.apache.org/jira/rest/api/2")
    +	github = GitHub(options)
    +	
    +	openPullRequests = github.openPulls("apache","incubator-storm")
    +	stormJiraNumber = re.compile("STORM-[0-9]+")
    +	openJiras = jrepo.openJiras("STORM")
    +	
    +	jira2Pulls = {}
    +	pullWithoutJira = []
    +	pullWithBadJira = []
    +	
    +	for pull in openPullRequests:
    +		found = stormJiraNumber.search(pull.title())
    +		if found:
    +			jiraNum = found.group(0)
    +			if not (jiraNum in openJiras):
    +				pullWithBadJira.append(pull)
    +			else:
    +				if jira2Pulls.get(jiraNum) == None:
    +					jira2Pulls[jiraNum] = []
    +				jira2Pulls[jiraNum].append(pull)
    +		else:
    +			pullWithoutJira.append(pull);
    +	
    +	now = datetime.utcnow()
    +	print "Pull requests that need a JIRA:"
    +	for pull in pullWithoutJira:
    +		print ("%s\t%s\t%s\t%s"%(pull.html_url(), pull.title(), daydiff(now, pull.created_at()), daydiff(now, pull.updated_at()))).encode("UTF-8")
    +	
    +	print "\nPull with bad JIRA:"
    +	for pull in pullWithBadJira:
    +		print ("%s\t%s\t%s\t%s"%(pull.html_url(), pull.title(), daydiff(now, pull.created_at()), daydiff(now, pull.updated_at()))).encode("UTF-8")
    +	
    +	print "\nOpen JIRA to Pull Requests and Votes:"
    +	for key, value in jira2Pulls.items():
    +		print ("%s\t%s\t%s\t%s\t%s"%(key, mstr(value),openJiras[key].getSummary(), daydiff(now, openJiras[key].getCreated()), daydiff(now, value[0].created_at()))).encode("UTF-8")
    --- End diff --
    
    On second thought, it would be nice to use `updated_at` instead of or in addition to `created_at` for the last column here.  This way we can sort by staleness.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-storm pull request: [STORM-321] Added a tool to see the ...

Posted by d2r <gi...@git.apache.org>.
Github user d2r commented on the pull request:

    https://github.com/apache/incubator-storm/pull/116#issuecomment-49365496
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---