Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

META: Create web app to better structure email interactions with github re: this issue tracker #94

Open

Description

@patcon

On reflection of @whit537's documentation and interaction process (specifically in #93):

To help others engage most effectively with this issue tracker, perhaps we could build an app that would automatically send emails to the appropriate github support email when an issue is opened, providing a reply-to header that will be used to update the issue itself (and forwarded to the submitting github user's email).

Obviously this could be very simple or a little more full-featured. Not sure if you guys think this is overkill, or whether it would help demonstrate that github users are serious in their desire for some open solution for feature and issue tracking.

Instead of diving into depth on what this could be, anyone else think there's merit in the premise?

cc: @balupton

Activity

  1. balupton commented on Sep 7, 2013

    @balupton

    Seems good. I'd love to see a mailing list that syncs to a github repo issues.

  2. brock commented on Sep 7, 2013

    @brock

    I like this idea, so I did some digging just to answer the questions of "what's possible". Here's what I found as one possible option:

    The test uses the following mechanisms:

    • a webhook on this repo whenever a new issue is created
    • the webhook posts the payload to a Sinatra app
    • the sinatra app uses the pony gem to send the emails

    The webhook could be setup for IssuesEvents or an IssueCommentEvent. I'd think an IssueEvent would suffice.

    Here's how I setup the webhook:

    POST to https://api.github.com/repos/brockangelo/passport-localapikey/hooks using my oath token:

    {
      "name": "web",
      "active": true,
      "events": ["issues"],
      "config": {
        "url": "http://requestb.in/u6i2q7u6"
      }
    }
    

    Feel free to post an issue to my repo and view the requestbin payload if you like. Its not sending to Github support yet.

    New issues created include these pertinent details in the payload: (pseudo-json)

    payload: 
        action: opened
        issue.html_url: https://github.com/brockangelo/passport-localapikey/issues/2
        issue.title: test issue
        issue.body: test issue reporting
        sender.login: brockangelo
        sender.html_url: https://github.com/brockangelo 
    

    You can see the full payload at requestb.in

    Then I setup a webhook to post to a sinatra app. Here's the general idea for the app:

    class ReportIssues
      post '/post' do
        # we'd set a hidden param so this only processes if an included key is sent
    
        # parse the payload
        issue = JSON.parse(params[:payload])
        sender = issue.sender.login  # brockangelo
    
        # email isn't included in the payload, so get it from the github api
        email = httparty.get(... using `sender` from above )
    
        # only send if the payload if from this repo's issues  
        if issue.html_url =~ /https:\/\/github.com\/brockangelo\/passport-localapikey\/issues\/\d+'
              // send email
              Pony.mail( :to => support@github.com, :from => `sender`...)
        end
      end
    end
    

    Some notes:

    I'd probably want another set of eyes on the sinatra app so we can prevent someone from posting payloads and spamming support and getting us (me) banned. But as a proof of concept, it could work.

  3. patcon commented on Sep 8, 2013

    @patcon
    Author

    Nice! That's awesome! (FYI, the requestbin is private to you browser, apparently: http://requestb.in/u6i2q7u6?inspect)

    That sounds like a great flow and approach. Thoughts on handling support replies? Should the app have a simple mailbox so that support can reply to an address like replies+94@githubissues.net and have that automatically be posted to the appropriate issue?

    I agree that IssueEvent should do the trick. Comment events would likely make it too tricky to avoid spamming them.

    Regardless, curious how edited messages are handled, or whether any hook fires for an edit.

  4. brock commented on Sep 8, 2013

    @brock

    thanks @patcon I updated my webhooks and added a new requestbin here: http://requestb.in/1im2zyj1 That should fire if you want to test another issue just to see the payload.

    Ya, one possibility might be to send these messages from a new gmail address, then setup our sinatra app to also process gmail replies from support@github.com and post them to the relevant issue thread. Might take some trial and error, but could probably work.

  5. patcon commented on Oct 13, 2013

    @patcon
    Author

    FYI, seems the idea of a bridge was discussed 2 months prior in #6 (comment)

    GitHub staff respectfully requested that no one build it. Not sure how I feel about that... :/

  6. patcon commented on Apr 21, 2014

    @patcon
    Author

    I might pick this up again. Lots of people are now sending emails to support@github.com when they open tickets here, but I think they usually don't link the ticket, so it's not obvious to those on support how important this repo is to the issue at hand

  7. patcon commented on Apr 21, 2014

    @patcon
    Author

    Oh, just reread my own prior message. Rats.

  8. stuartpb commented on Jan 8, 2015

    @stuartpb

    Well, I've made a userscript that automatically suggests creating an issue on isaacs/github after you send an email to support via https://github.com/contact: https://github.com/ghes/isaacs-github-contact-xposter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions