{"action":"created","issue":{"url":"https://api.github.com/repos/yaobinshi/test1/issues/256","labels_url":"https://api.github.com/repos/yaobinshi/test1/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/yaobinshi/test1/issues/256/comments","events_url":"https://api.github.com/repos/yaobinshi/test1/issues/256/events","html_url":"https://github.com/yaobinshi/test1/issues/256","id":53376442,"number":256,"title":"Enhance email notification to allow customization via fossology.conf","user":{"login":"yaobinshi","id":8425217,"avatar_url":"https://avatars.githubusercontent.com/u/8425217?v=3","gravatar_id":"","url":"https://api.github.com/users/yaobinshi","html_url":"https://github.com/yaobinshi","followers_url":"https://api.github.com/users/yaobinshi/followers","following_url":"https://api.github.com/users/yaobinshi/following{/other_user}","gists_url":"https://api.github.com/users/yaobinshi/gists{/gist_id}","starred_url":"https://api.github.com/users/yaobinshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaobinshi/subscriptions","organizations_url":"https://api.github.com/users/yaobinshi/orgs","repos_url":"https://api.github.com/users/yaobinshi/repos","events_url":"https://api.github.com/users/yaobinshi/events{/privacy}","received_events_url":"https://api.github.com/users/yaobinshi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yaobinshi/test1/labels/Category%3A+Notification","name":"Category: Notification","color":"ededed"},{"url":"https://api.github.com/repos/yaobinshi/test1/labels/Component%3A+Rank","name":"Component: Rank","color":"fad8c7"},{"url":"https://api.github.com/repos/yaobinshi/test1/labels/Component%3A+Tester","name":"Component: Tester","color":"fad8c7"},{"url":"https://api.github.com/repos/yaobinshi/test1/labels/Priority%3A+Normal","name":"Priority: Normal","color":"fef2c0"},{"url":"https://api.github.com/repos/yaobinshi/test1/labels/Status%3A+Closed","name":"Status: Closed","color":"009800"},{"url":"https://api.github.com/repos/yaobinshi/test1/labels/Tracker%3A+Feature","name":"Tracker: Feature","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/yaobinshi/test1/milestones/5","labels_url":"https://api.github.com/repos/yaobinshi/test1/milestones/5/labels","id":918189,"number":5,"title":"2.0.0","description":null,"creator":{"login":"yaobinshi","id":8425217,"avatar_url":"https://avatars.githubusercontent.com/u/8425217?v=3","gravatar_id":"","url":"https://api.github.com/users/yaobinshi","html_url":"https://github.com/yaobinshi","followers_url":"https://api.github.com/users/yaobinshi/followers","following_url":"https://api.github.com/users/yaobinshi/following{/other_user}","gists_url":"https://api.github.com/users/yaobinshi/gists{/gist_id}","starred_url":"https://api.github.com/users/yaobinshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaobinshi/subscriptions","organizations_url":"https://api.github.com/users/yaobinshi/orgs","repos_url":"https://api.github.com/users/yaobinshi/repos","events_url":"https://api.github.com/users/yaobinshi/events{/privacy}","received_events_url":"https://api.github.com/users/yaobinshi/received_events","type":"User","site_admin":false},"open_issues":95,"closed_issues":0,"state":"open","created_at":"2014-12-31T01:30:07Z","updated_at":"2015-01-05T09:04:54Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-01-05T09:04:54Z","updated_at":"2015-01-05T09:04:55Z","closed_at":null,"body":"---\n\n\nAuthor Name: **Mary Laser** \nOriginal Redmine Issue: 21, http://www.fossology.org/issues/21\nOriginal Date: 2012/02/06\nOriginal Assignee: Mark Donohoe\n\n---\n\nToday on IRC we were discussing how to make job notifications more useful and flexible.  Here is what we came up with.  Consider this a draft and is open to discussion.  Comments are welcome.\r\n\r\n1) To make the notifications more customizable, add three variables and a new section to fossology.conf:\r\n\r\n    [EMAILNOTIFY]\r\n    header=myheaderfile\r\n    footer=myfooterfile\r\n    subject=mysubject\r\n\r\nWhen a job completes, the scheduler will send a plain text email notification (if turned on in the user record) to the user.  The email will have the subject \"mysubject\", which by default is \"FOSSology scan complete\".  The scheduler will write into the email:\r\n  a) the contents of the file myheaderfile\r\n  b) any agent messages\r\n  c) the contents of the file myfooterfile\r\n\r\nOur default fossology.conf would look like:\r\n\r\n  [EMAILNOTIFY]\r\n  header=emailheader.txt\r\n  footer=emailfooter.txt\r\n  subject=FOSSology scan complete\r\n\r\nFiles are located in $SYSCONFDIR.\r\n\r\nThe contents of emailheader.txt could be:\r\n\r\nYour FOSSology scan for $DB.upload.upload_filename has $JOBRESULT.\r\n\r\n\r\nThe contents of emailfooter.txt could be:\r\n\r\nComplete job information can be found at $JOBQUEUELINK.\r\n\r\n2) the header and footer files can contain variables that will be substituted by the scheduler.  Possible variables are:\r\n\r\n$BROWSELINK  browse link to upload\r\n$JOBQUEUELINK link to job queue details (showjob) $JOBRESULT is \"completed successfully\" or \"failed\"\r\n$SCHEDULERLOG link to scheduler log\r\n$UPLOADFOLDERNAME name of upload folder\r\n$DB.tablename.columnname this only applies to certain tables (upload, user, job tables)\r\n\r\n\r\n3) Agents can add messages to the email notification with a new function call (or macro) NOTIFY_EMAIL(message).  It would be good if some agents added a link to the notification with direct links to their results.  This applies to nomos, buckets, copyright, and the license list (new) agent.\r\n\r\ncomments?\r\n\r\nBob Gobeille\r\n\n\n\n"},"comment":{"url":"https://api.github.com/repos/yaobinshi/test1/issues/comments/68682600","html_url":"https://github.com/yaobinshi/test1/issues/256#issuecomment-68682600","issue_url":"https://api.github.com/repos/yaobinshi/test1/issues/256","id":68682600,"user":{"login":"yaobinshi","id":8425217,"avatar_url":"https://avatars.githubusercontent.com/u/8425217?v=3","gravatar_id":"","url":"https://api.github.com/users/yaobinshi","html_url":"https://github.com/yaobinshi","followers_url":"https://api.github.com/users/yaobinshi/followers","following_url":"https://api.github.com/users/yaobinshi/following{/other_user}","gists_url":"https://api.github.com/users/yaobinshi/gists{/gist_id}","starred_url":"https://api.github.com/users/yaobinshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaobinshi/subscriptions","organizations_url":"https://api.github.com/users/yaobinshi/orgs","repos_url":"https://api.github.com/users/yaobinshi/repos","events_url":"https://api.github.com/users/yaobinshi/events{/privacy}","received_events_url":"https://api.github.com/users/yaobinshi/received_events","type":"User","site_admin":false},"created_at":"2015-01-05T09:04:55Z","updated_at":"2015-01-05T09:04:55Z","body":"---\n\nOriginal Redmine Comment\nAuthor Name: **Alex Norton** \nOriginal Date: 2012/01/13 21:38:53 +0000\n\n---\n\nfinished, just needs testing"}}