[
https://issues.apache.org/jira/browse/BIGTOP-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14021130#comment-14021130
]
jay vyas commented on BIGTOP-1249:
----------------------------------
After some more playing, looks like the Java API
{{'net.rcarz:jira-client:0.4'}} Is really useful for this: Probably more
concise than any other approach. Here is a very raw snippet of how to use it
for this sort of thing in scala (im finding a bug with getAttachments, but
otherwise, looks like a nice way to monitor JIRAs periodically and super easy
to test / maintain.
{noformat}
val creds = new BasicCredentials("jayunit100", "...........")
val client = new JiraClient("https://issues.apache.org/jira", creds);
val issueResult =
client.
searchIssues("project=BIGTOP AND status=OPEN AND updated > -1m");
// searchIssues("project=BIGTOP AND status=CLOSED AND attachments IS NOT
EMPTY");
println(issueResult.total);
println(issueResult.issues.size());
(0 to issueResult.issues.size()-1).
foreach((i:Int) =>
println(i + " attachements: " +
issueResult.issues.get(i).getKey()+" (key)"+
issueResult.issues.get(i).getComponents().size()+" (comp)"+
issueResult.issues.get(i).getAttachments().size() + "(attach)"))
issueResult.
issues.
foreach((i: Issue) =>
i.getAttachments().
foreach(
(a: Attachment) =>
println(i + " DATE : "+ a.getCreatedDate())));
{noformat}
> Umbrella JIRA: Pre-commit hooks and automated Patch validation
> --------------------------------------------------------------
>
> Key: BIGTOP-1249
> URL: https://issues.apache.org/jira/browse/BIGTOP-1249
> Project: Bigtop
> Issue Type: Improvement
> Components: Build
> Affects Versions: 0.7.0
> Reporter: jay vyas
> Labels: hackathon
> Fix For: 0.8.0
>
>
> Lets automate some of the review process.
> - It will be good to add in some pre-commit hooks which check for ASF
> boilerplate on all files and trailing whitespace.
> - It will be also nice if the build server can run "mvn compile" and some
> other basic validation on the code base every time a patch is submitted,
> similar to the way apache hadoop is doing.
> I say lets start small: Maybe on the upcoming hack day in denver we can glue
> the basic JIRA monitoring together with a simple bash script, and iterate
> from there.
--
This message was sent by Atlassian JIRA
(v6.2#6252)