Giter VIP home page Giter VIP logo

phabulous's Introduction

Phabulous

Example

Phabulous is a Slack bot for Phabricator.

Node.js version: The Javascript version of this project has been replaced with a rewrite from scratch in Go. The code for the Javascript version is available at the legacy branch, but it won't be actively maintained.

Build Status Docker Repository on Quay Go Report Card

Features

  • Post URLs to revisions and tasks right from Slack.
  • Summon (mention) reviewers of a revision.
  • Route specific events (Tasks, Revisions, Commits) into specific channels.
  • Push all feed events into a single channel (This may flood a channel if your organization is big enough).
  • Pretty icons ;)

Guides

Compiling from source

To compile Phabulous, you need a recent version of Go (>= 1.9) and dep:

go get github.com/etcinit/phabulous/cmd/phabulous

// or, for cross-compiling:

go get github.com/laher/goxc
git clone [email protected]:etcinit/phabulous.git
cd phabulous
make

phabulous's People

Contributors

berkus avatar dlackty avatar etcinit avatar farshidce avatar herbsears-oanda avatar martinlindhe avatar mitali31 avatar peggyl avatar schemar avatar sudowork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phabulous's Issues

Panic Recovery -> Post _____/api/conduit.getCapabilities timeout??

Panic recovery -> Post _______/api/conduit.getcapabilities: dial tcp ***.***.**.**:443: getsockopt: connection timed out

Seem to be getting this whenever the feed webhook triggers. I wonder if it's a config issue? I followed the exact instructions for generating the api token, not sure how to troubleshoot if it's an issue with that. Verified that the webhook is indeed working correctly. Any ideas?

Accept indirect commands as part of longer string

When someone in the chat refers to a Phabricator object, I'd love if Phabulous saw it as an indirect command.

For example, if someone says "I really like what you did on T21", Phabulous could reply with the equivalent of the "T21" indirect command.

I understand this might include false positives at times (although I believe it is unlikely), but I don't think those would be annoying.

Summon fails: json: cannot unmarshal object into Go struct field DifferentialRevision.reviewers of type []string

Hi,

We're currently using the newest versions of Phabricator (Docker image bitnami/phabricator:2017.13-r0) and Phabulous (built from source last night). Almost everything is working as intended, except the summon command fails with the following error: json: cannot unmarshal object into Go struct field DifferentialRevision.reviewers of type []string

Thank you for any help you can provide!

Maintainer Offered

Hey @etcinit

it seems you have no time anymore to maintain this repository. I would offer to take over. I can create some pull requests, if you'd like, but it seems you won't read those anyways :(

Cheers,
Martin

Some feed events are failing to return 200

Initially noticed some strange behavior where certain feed events were showing up in the channel multiple times. This is caused by Phabricator's behavior which will continue to retry if it doesn't receive a 200 when the event is posted. However, it seems that the error is happening after the message goes through to slack, since we are seeing duplicate messages.

This is what we get while monitoring phabulous in debug mode:

2017/02/01 17:41:10 Panic recovery -> runtime error: index out of range
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:423 (0x806f34d)
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:12 (0x806dc93)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/resolvers/differential.go:47 (0x81e1236)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:90 (0x815ff47)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:29 (0x8160c78)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x8161099)
/Users/etcinit/go/src/github.com/gin-gonic/gin/logger.go:56 (0x816ec7f)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x8161099)
/Users/etcinit/go/src/github.com/gin-gonic/gin/recovery.go:43 (0x816f5ea)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x8161099)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:294 (0x8166603)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:275 (0x81662fe)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1862 (0x81fbbb6)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1361 (0x81f9905)
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_386.s:1662 (0x8097d61)

Direct message reviewers

Are there any plans to support direct messaging reviewers? Of course this would involve needing to know a mapping of phabricator usernames -> slack usernames, which could make things difficult. The reason for requesting this feature is that the phabricator feed gets pretty noisy relatively quickly. Even with selective mentions/highlighting, self-actions can be quite a lot to filter through. The last piece of reasoning is that, although the summon command is useful, it requires a user to manually take action.

Bot icon

Hello, @etcinit
Thanks for the great work!

As we can see in example screenshot, there's a beautiful bot icon for phabulous.
Example

Would you mind to share with us?

Posts about adding a comment (and other task ops?) should include comment as slack "attachment"

As it stands I find "added a comment" messages more annoying than helpful. I think this would just be a regex match (or maybe not depending whats in the webhook payload - is there docs on that?), a conduit fetch and a little refactor to FeedPost to use the Attachments field of the PostMessageParameters.

I might get you a PR for this in the medium-distant future. But if you wanna implement first that's cool too 😄

Add formatting for more visually parseable messages

The messages phabulous sends are difficult to visually parse. Instead of:

person closed D4281: Add things to the thing by committing rTd74ade4cded6: Add things to the thing. ([More info]()) otherperson updated the test plan for D4311: Fix some things. ([More info]())

Adding some variation in formatting makes it easier to focus on the different parts of the message (what was done, who did it, what did they do it to):

**person** closed **D4281: Add things to the thing** by committing **rTd74ade4cded6: Add things to the thing**. ([More info]()) **otherperson** updated the test plan for **D4311: Fix some things**. ([More info]())

Ability to filter the feed

It would be good to have a way to only send some feed items to slack.

For example, only feed items related to a particular project, or only send Diffusion Commits, etc..

Phid fetcher error

I get the following error when Phabricator sends a story to this app:

Successfully connected to Phabricator over Conduit
Phabricator-Slack connector server started on port 8085
storyID=316&storyType=PhabricatorApplicationTransactionFeedStory&storyData%5BobjectPHID%5D=PHID-CMIT-6xoj432vhfuvakcimuyj&storyData%5BtransactionPHIDs%5D%5B0%5D=PHID-XACT-CMIT-caaq75jvku4r6wg&storyAuthorPHID=PHID-USER-x2goqaxi44vaa6d25ho6&storyText=steve.workman+added+a+comment+to+rFTLd92f04ac653c%3A+Fixes+schema.org+for+reviews+with+0+reviews.&epoch=1441749295
/Users/tvdashboard/dashboards/phabricator-slack-feed/node_modules/babel/node_modules/core-js/shim.js:346
  if(it == undefined)throw TypeError('Function called on null or undefined');
                     ^
TypeError: Function called on null or undefined
    at TypeError (native)
    at assertDefined (/Users/tvdashboard/dashboards/phabricator-slack-feed/node_modules/babel/node_modules/core-js/shim.js:346:28)
    at toObject (/Users/tvdashboard/dashboards/phabricator-slack-feed/node_modules/babel/node_modules/core-js/shim.js:178:20)
    at Function.o.(anonymous function) (/Users/tvdashboard/dashboards/phabricator-slack-feed/node_modules/babel/node_modules/core-js/shim.js:739:19)
    at /Users/tvdashboard/dashboards/phabricator-slack-feed/src/Conduit/PhidFetcher.js:42:35
    at Request._callback (/Users/tvdashboard/dashboards/phabricator-slack-feed/node_modules/canduit/canduit.js:96:5)
    at Request.self.callback (/Users/tvdashboard/dashboards/phabricator-slack-feed/node_modules/canduit/node_modules/request/request.js:198:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/Users/tvdashboard/dashboards/phabricator-slack-feed/node_modules/canduit/node_modules/request/request.js:1073:14)
    at Request.emit (events.js:129:20)

It looks like no response is coming from phabricator, I've got my config set like this:

{
  "server": {
    "port": 8085
  },
  "slack": {
    "username": "phabricator",
    "url": "https://hooks.slack.com/services/*****/**************"
  },
  "conduit": {
    "user": "slack",
    "api": "http://server.domain.com/",
    "cert": "cli-*****************"
  },
  "misc": {
    "ignore-ca": false
  }
}

Any ideas?

json: cannot unmarshal array into Go value of type responses.PHIDLookupResponse

Consistently getting this error:

ERRO[0003] json: cannot unmarshal array into Go value of type responses.PHIDLookupResponse 

I'm on the latest master branch of Phabricator, and I have tried both release 2.3.0 of Phabulous, as well as manually compiling the master branch. I got the same error from both.

I've been testing by sending the message "lookup T123" to the Phabulous bot, and it has resulted in the above error every time (and the bot responds with an error message in the chat).

Here's my configuration:

server:
  port: 8085
  debug: false

  # Serious-mode makes some messages more formal and business-friendly.
  serious: false
slack:
  token: REDACTED
  username: phabricator
conduit:
  api: REDACTED
  # For token-based auth, use the following key:
  token: REDACTED

  # For certificate-based auth, use the following keys:
  #user: etcinit
  #cert: ''
channels:
  # The feed channel is where Phabulous will post every feed event to this
  # channel. Leave it blank to disable this feature.
  #feed: '#phabricator'

  # You can map repositories to a channel. This will send feed events regarding
  # commits and revisions to the specified channel.
  #repositories:
  #  CALLSIGN: '#channel'
  #  OTHERCALLSIGN: '#otherchannel'

  # You can map projects to a channel. This will send feed events regarding
  # tasks to the specified channel.
  projects:
    17: '#development'
misc:
  ignore-ca: false

Format message put into slack

As of now , the message put into slack is as raw text and link.
Rather , it would be good to have the message like below

screen shot 2017-01-26 at 8 16 28 pm

Tasks with multiple projects get routed improperly

We tag each task with a project tag and a type tag (using project tags), so an average task might have the project tags #someexampleproject and #code.
We've set phabulous to route notifications about tasks with the #someexampleproject tag to a certain slack channel. These never arrive if the tasks includes any other tags.

To summarize, phabulous seems to assume the tag rule to be this tag and nothing else while I expect it to be at least this tag. Not sure if this is intentional.

Too long to start the server

Hi. I have followed the guide and tried to install phabulous , but it tooks too much time to start it. After 15min, I definitely thought something is wrong. Any advice?

How to repeat:

  1. install the version
  2. try running
    ./phabulous serve

Settings:

  1. debian jessy
  2. phabulous_3.0.0-beta1_linux_amd64

ERR-INVALID-USER with api token auth

Hi!

I'm facing a ERR-INVALID-USER: The username you are attempting to authenticate with is not valid. error soon after the server is launched.

What could be the problem as my conduit conf in the main.yml file looks like this:

conduit:
  api: 'https://my-phabricator.com'

  # For token-based auth, use the following key:
  token: 'api-mytoken'

  # For certificate-based auth, use the following keys:
  #user: bruh
  #cert: 'test'

Cheers,

invalid character '<' looking for beginning of value

2015/11/14 11:21:02 Panic recovery -> invalid character '<' looking for beginning of value
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:423 (0x42a9e9)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:34 (0x5110dc)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:26 (0x51265a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x512b2a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/logger.go:56 (0x523fd1)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x512b2a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/recovery.go:43 (0x524b31)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x512b2a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:294 (0x519582)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:275 (0x5191b7)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1862 (0x5d05be)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1361 (0x5cdbfe)
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 (0x45bf01)

phabulous serve just hangs and doesn't bind on an ip address

I've followed the documentation to set up phabulous, but when I run phabulous serve, it seems to spawn three children and then just sits there, with out binding up on any IP address.

Is there a way to log what's going on to help troubleshoot this?

invalid memory address or nil pointer dereference

DEBU[1721] epoch=1468229169&storyAuthorPHID=PHID-USER-t6ri6rdnpitrxzehpzg2&storyData%5BobjectPHID%5D=PHID-DREV-osf4mldkw5pusskur6rq&storyData%5BtransactionPHIDs%5D%5BPHID-XACT-DREV-2kbgp7ketmerrf4%5D=PHID-XACT-DREV-2kbgp7ketmerrf4&storyData%5BtransactionPHIDs%5D%5BPHID-XACT-DREV-pemd3jkgtrrbl5z%5D=PHID-XACT-DREV-pemd3jkgtrrbl5z&storyID=11614&storyText=sometext&storyType=PhabricatorApplicationTransactionFeedStory 


2016/07/12 09:22:20 [Recovery] panic recovered:
POST /v1/feed/receive HTTP/1.1
Host: localhost:8085
Accept: */*
Content-Type: application/x-www-form-urlencoded


runtime error: invalid memory address or nil pointer dereference
.gvm/gos/go1.6/src/runtime/panic.go:426 (0x42d2b9)
.gvm/gos/go1.6/src/runtime/panic.go:45 (0x42b969)
.gvm/gos/go1.6/src/runtime/sigpanic_unix.go:24 (0x441c1a)
.gvm/pkgsets/go1.6/global/src/github.com/etcinit/phabulous/app/controllers/feed.go:55 (0x5560ca)
.gvm/pkgsets/go1.6/global/src/github.com/etcinit/phabulous/app/controllers/feed.go:29 (0x5577aa)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/context.go:97 (0x557c7a)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/recovery.go:45 (0x56a511)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/context.go:97 (0x557c7a)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/logger.go:63 (0x5697aa)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/context.go:97 (0x557c7a)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/gin.go:284 (0x55ead2)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/gin.go:265 (0x55e707)
.gvm/gos/go1.6/src/net/http/server.go:2081 (0x698d5e)
.gvm/gos/go1.6/src/net/http/server.go:1472 (0x69560e)
.gvm/gos/go1.6/src/runtime/asm_amd64.s:1998 (0x45de21)

Keep slack bot and auto messages consistent

I just found this bot and gave it a spin though I'm a little bit confused about the way it handles:

screen shot 2016-02-26 at 8 50 39 am

In particular:

  • Can I tell it to actually use the bot to post messages? Right now it's doing a direct slack API push to post a message
  • Related to that, can I change the icon of it? It just seems odd to have 2 phabricator bots with 2 different names and 2 different icons posting stuff in the same channel

Documentation inconsistency

The config.yml checked into the repo starts phabulous on port 8085, but the webhook example on the Getting Started page uses 8086.

Create repositories-only feed channel

Hi,

I have a pretty small organization and I think it would be quite useful to have ONLY repository feed information posted to a channel... basically the same as "feed" but only repository commits/revisions without the need to specify every callsign.

I'm getting "flooded" with messages because there are honestly too many things in the feed by default, so having a "repos only" option for the feed items would be great.

Consistent parsing problem with latest stable phabricator

Jan 27 16:30:35 server1 phabulous[13013]: 2016/01/27 16:30:35 [Recovery] panic recovered:
Jan 27 16:30:35 server1 phabulous[13013]: POST /v1/feed/receive HTTP/1.1
Jan 27 16:30:35 server1 phabulous[13013]: Host: 127.0.0.1:8086
Jan 27 16:30:35 server1 phabulous[13013]: Accept: */*
Jan 27 16:28:33 server1 phabulous[13013]: Content-Type: application/x-www-form-urlencoded
Jan 27 16:28:33 server1 phabulous[13013]: json: cannot unmarshal array into Go value of type responses.PHIDQueryResponse
Jan 27 16:28:33 server1 phabulous[13013]: /usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:423 (0x42ab99)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:49 (0x546592)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:29 (0x547cea)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/gin-gonic/gin/context.go:97 (0x5481ba)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/gin-gonic/gin/recovery.go:45 (0x55a931)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/gin-gonic/gin/context.go:97 (0x5481ba)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/gin-gonic/gin/logger.go:66 (0x559bda)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/gin-gonic/gin/context.go:97 (0x5481ba)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/gin-gonic/gin/gin.go:294 (0x54eff2)
Jan 27 16:28:33 server1 phabulous[13013]: /Users/berkus/Tools/go/src/github.com/gin-gonic/gin/gin.go:275 (0x54ec27)
Jan 27 16:28:33 server1 phabulous[13013]: /usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1862 (0x64d6ae)
Jan 27 16:28:33 server1 phabulous[13013]: /usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1361 (0x64acee)
Jan 27 16:28:33 server1 phabulous[13013]: /usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 (0x45c111)
Jan 27 16:28:33 server1 phabulous[13013]:
Jan 27 16:28:33 server1 phabulous[13013]: [GIN] 2016/01/27 - 16:28:33 | 500 |  206.227277ms | 127.0.0.1 |   POST    /v1/feed/receive

invalid memory address or nil pointer dereference

Hi! I have a problem. When I run the container I get the following errors:

DEBU[0008] epoch=1508505067&storyAuthorPHID=PHID-USER-rc4zdnym2dhfj7mri64q&storyData%5BobjectPHID%5D=PHID-CMIT-unyvog56oyceirr2nsmm&storyData%5BtransactionPHIDs%5D%5BPHID-XACT-CMIT-evokndi6l4iy2dp%5D=PHID-XACT-CMIT-evokndi6l4iy2dp&storyID=166298&storyText=belyshov+committed+rUFSD314156%3A+SAF-122+FIx+build.&storyType=PhabricatorApplicationTransactionFeedStory


2017/10/20 15:13:31 [Recovery] panic recovered:
POST /v1/feed/receive HTTP/1.1
Host: host:8085
Accept: */*
Content-Length: 350
Content-Type: application/x-www-form-urlencoded


runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:489 (0x429eef)
        gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/local/go/src/runtime/panic.go:63 (0x428d9e)
        panicmem: panic(memoryError)
/usr/local/go/src/runtime/signal_unix.go:290 (0x43ed2f)
        sigpanic: panicmem()
/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:56 (0x84b6b1)
        (*FeedController).postReceive: if res.URI != "" {
/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:30 (0x84ce44)
        postReceive)-fm: front.POST("/receive", f.postReceive)
/go/src/github.com/gin-gonic/gin/context.go:97 (0x83995a)
        (*Context).Next: c.handlers[c.index](c)
/go/src/github.com/gin-gonic/gin/recovery.go:45 (0x848daa)
        RecoveryWithWriter.func1: c.Next()
/go/src/github.com/gin-gonic/gin/context.go:97 (0x83995a)
        (*Context).Next: c.handlers[c.index](c)
/go/src/github.com/gin-gonic/gin/logger.go:72 (0x84807f)
        LoggerWithWriter.func1: c.Next()
/go/src/github.com/gin-gonic/gin/context.go:97 (0x83995a)
        (*Context).Next: c.handlers[c.index](c)
/go/src/github.com/gin-gonic/gin/gin.go:284 (0x83fba0)
        (*Engine).handleHTTPRequest: context.Next()
/go/src/github.com/gin-gonic/gin/gin.go:265 (0x83f4bb)
        (*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/local/go/src/net/http/server.go:2568 (0x6ccf62)
        serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1825 (0x6c91d2)
        (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:2197 (0x455dd1)
        goexit: BYTE    $0x90   // NOP

Panic recovery -> invalid character '<' looking for beginning of value

Hello,

I am using the latest release (2.3.0) and have configured the bot using the main/config.yml file. When I run the bot, it seems to be working and it says Hi! Phabulous v2 reporting for duty in the channel I have it in.

However, when feed events occur within my Phabricator installation Phabulous logs the following.

2016/10/05 12:59:32 Panic recovery -> invalid character '<' looking for beginning of value
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:423 (0x42abc9)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:37 (0x5433b8)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:29 (0x544bca)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x54509a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/logger.go:56 (0x556541)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x54509a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/recovery.go:43 (0x5570a1)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x54509a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:294 (0x54baf2)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:275 (0x54b727)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1862 (0x5fe5fe)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1361 (0x5fbc3e)
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 (0x45c141)

Any idea what might be happening?

json: cannot unmarshal array into Go value of type responses.PHIDQueryResponse

Running on Debian 8 (stable) amd64. Both Phabricator and Phabulous running on the same instance.
Getting this error every time that a new event appears in the feed and activates the outgoing hook. Similar error when trying to lookup task or diffs by DM

2016/02/03 15:45:46 [Recovery] panic recovered:
POST /v1/feed/receive HTTP/1.1
Host: localhost:8086
Accept: */*
Content-Type: application/x-www-form-urlencoded


json: cannot unmarshal array into Go value of type responses.PHIDQueryResponse
/home/work/src/github.com/etcinit/phabulous/app/controllers/feed.go:49 (0x501808)
    (*FeedController).postReceive: panic(err)
/home/work/src/github.com/etcinit/phabulous/app/controllers/feed.go:29 (0x502d10)
    postReceive).fm: front.POST("/receive", f.postReceive)
/home/work/src/github.com/gin-gonic/gin/context.go:97 (0x503171)
    (*Context).Next: c.handlers[c.index](c)
/home/work/src/github.com/gin-gonic/gin/recovery.go:45 (0x51360f)
    func.009: c.Next()
/home/work/src/github.com/gin-gonic/gin/context.go:97 (0x503171)
    (*Context).Next: c.handlers[c.index](c)
/home/work/src/github.com/gin-gonic/gin/logger.go:66 (0x512cb2)
    func.007: c.Next()
/home/work/src/github.com/gin-gonic/gin/context.go:97 (0x503171)
    (*Context).Next: c.handlers[c.index](c)
/home/work/src/github.com/gin-gonic/gin/gin.go:284 (0x509465)
    (*Engine).handleHTTPRequest: context.Next()
/home/work/src/github.com/gin-gonic/gin/gin.go:265 (0x50919e)
    (*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/lib/go/src/pkg/net/http/server.go:1673 (0x5dc13f)
    serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/lib/go/src/pkg/net/http/server.go:1174 (0x5d9b7e)
    (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/lib/go/src/pkg/runtime/proc.c:1445 (0x414150)
    goexit: runtime·goexit(void)

Phabricator Events

I can call tasks from Slack to get into from Phabricator but events such as adding a comment to a task isn't getting pushed to Slack. Have check the port through curl http://localhost:8085 and get a success message. However, I get a path not found when I do curl http://localhost:8085/v1/feed/receive.

Any ideas why the daemon is not picking up Phabricator events but able to read data from Phabricator on Slack commands?

Digests

Given that I am updating a Diff or Ticket
When I updated the same Diff or Ticket within the last 5 minutes
Then phabulous not immediately report to slack
But report digests within a configurable time period

Is there an option to enable this already? If not, it would be nice to have this. I would be willing to create a pull request for this.

The thing is that sometime conversations take place inside a ticket or a diff and slack gets spammed by phabulous. Digests would be a nice option to reduce the spam, but still get all updates.

json: cannot unmarshal object into Go value of type []interface {}

Hey,

getting this error when using phabulous to publish a specific project into a slack channel:
(*json.UnmarshalTypeError)(0xc82042a180)(json: cannot unmarshal object into Go value of type []interface {})
followed by
[GIN] 2016/05/15 - 00:14:29 | 200 | 823.713756ms | 127.0.0.1 | POST /v1/feed/receive.
When I'm using the complete feed functionality it works, but I only want messages to a specific project, so I think it is properly configurated. I'm able to lookup the events correctly:

3c7 [00:57] 
@phabulous-bot: lookup T41
Phabulous Bot [00:57] 
​*T41: Test 4*​ (open): https://phabricator.xxxxxx.xx/T41

But the bot doesn't publish them when they get created.

Best regards
Nils

Edit: Sorry, I've absolute no clue about Go. 😄 Took a look at the src but it's way too unfamiliar to me, so I can't make a pull reqest.

Index out of range - differential.go:47

Hi,

I use the 2.3 version.

Here is recurring log available in std output:

'''
2016/01/27 17:11:15 Panic recovery -> runtime error: index out of range
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:423 (0x42abc9)
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:12 (0x4290a9)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/resolvers/differential.go:47 (0x5dee03)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:90 (0x543bcf)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:29 (0x544bca)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x54509a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/logger.go:56 (0x556541)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x54509a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/recovery.go:43 (0x5570a1)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x54509a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:294 (0x54baf2)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:275 (0x54b727)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1862 (0x5fe5fe)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1361 (0x5fbc3e)
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 (0x45c141)
'''

Transient slack auth errors

I followed the Getting Started guide and run into errors that indicate my slack auth is not working. I execute ./phabulous serve in debug mode and see a lot of log lines that appear to be data from slack which includes channel and user data, but after a few seconds the logs indicate there was a slack auth issue.

phabulous joins configured channel with message: Hi! Phabulous v3 reporting for duty!, then goes offline.

Logs:

time="2018-01-02T19:01:53Z" level=debug msg="Logger is debug level."
time="2018-01-02T19:01:53Z" level=debug msg="Booted upper layer."
time="2018-01-02T19:01:53Z" level=info msg="Starting RTM handler..."
time="2018-01-02T19:01:53Z" level=info msg="Starting up the API server..."
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET   /                         --> github.com/etcinit/phabulous/app/controllers.(*FrontController).(github.com/etcinit/phabulous/app/controllers.getIndex)-fm (3 handlers)
[GIN-debug] GET   /healthcheck              --> github.com/etcinit/phabulous/app/controllers.(*FrontController).(github.com/etcinit/phabulous/app/controllers.getHealthCheck)-fm (3 handlers)
[GIN-debug] POST  /v1/feed/receive          --> github.com/etcinit/phabulous/app/controllers.(*FeedController).(github.com/etcinit/phabulous/app/controllers.postReceive)-fm (3 handlers)
time="2018-01-02T19:01:53Z" level=debug msg="API Server Hostname: :8085"
[GIN-debug] Listening and serving HTTP on :8085
time="2018-01-02T19:01:53Z" level=debug msg="RTM Event received."
time="2018-01-02T19:01:53Z" level=info msg="Attempting to connect to Slack (Attempt #1)"
time="2018-01-02T19:01:54Z" level=debug msg="RTM Event received."
(big user data blob log lines)
time="2018-01-02T19:01:54Z" level=debug msg="Connection counter: 1"
time="2018-01-02T19:01:54Z" level=info msg="Bot Slack ID:  U8MAN9WG5"
time="2018-01-02T19:01:54Z" level=debug msg="RTM Event received."
time="2018-01-02T19:01:54Z" level=debug msg="RTM Event received."
time="2018-01-02T19:01:54Z" level=debug msg="RTM Event received."
time="2018-01-02T19:01:54Z" level=info msg="Attempting to connect to Slack (Attempt #1)"
time="2018-01-02T19:01:54Z" level=debug msg="RTM Event received."
time="2018-01-02T19:01:54Z" level=error msg="Unable to connect/authenticate with Slack. Check the bot's credentials."
time="2018-01-02T19:01:54Z" level=debug msg="RTM Event received."
time="2018-01-02T19:01:54Z" level=info msg="Attempting to connect to Slack (Attempt #2)"
time="2018-01-02T19:01:54Z" level=debug msg="RTM Event received."
...

summons command does not validate to summon for a valid review

While summoning a reviewer to review for a task it does not pre-check if the reviewer has already reviewed a revision. In either cases if the reviewer has already accepted the revision, rejected or asked for a change the summon command summons the user.

Update version strings

Figure out a better way of including the version in the binary. Currently, it is being hardcoded in a couple of places.

Command line option for config location

I'm using phabulous on a FreeBSD system, and I've found that phabulous only picks up the config file if my shell session is in the same directory as the phabulous executable. This makes it difficult to daemonize phabulous and treat it as a service. I saw that it's possible to use environment variables to store the config settings, but I wonder if it might be easier to be able to specify the config location on the command line such as /usr/local/bin/phabulous --config /usr/local/etc/phabulous/main.yml serve.

Give understandable error if configuration is faulty

As an admin
I want to get informed if the config is faulty
Because I need to know how to fix it

Given that I start phabulous
When an important config parameter is missing
Then the log should tell me exactly which one is missing
But instead I just get:
runtime error: invalid memory address or nil pointer dereference

See also #39 and #63.

HipChat

Would this project be open to accepting PRs around supporting additional chat protocols? We're interested in HipChat instead of Slack, and this could potentially be used for a general XMPP implementation as well.

Support for Phabricator webhooks?

It seems Phabulous only supports the (old-style) feed.http-hooks hooks, which are unauthenticated and go over http (not https).

This works fine when running your own Phabricator instance on the same host as Phabulous (you make Phabulous listen only on localhost and make Phabricator connect to localhost:XXXX) but not when using a (Phacility or otherwise) hosted Phabricator instance: the POST request from Phabricator would go through http (not https) over the public Internet; also Phabulous cannot authenticate that it came from the right place.

In February 2018, Phabricator added webhooks, which are hashed with a secret shared between Phabricator and the webhook: https://secure.phabricator.com/book/phabricator/article/webhooks/ (This is similar to Github's webhooks: https://developer.github.com/webhooks/securing/)

Are there any plans to add support for Phabricator webhooks to Phabulous?

Request has no 'params' key

Any thoughts? :)

2015/11/23 07:10:26 Panic recovery -> ERR-CONDUIT-CORE: Request has no 'params' key. This may mean that an extension like Suhosin has dropped data from the request. Check the PHP configuration on your server. If you are developing a Conduit client, you MUST provide a 'params' parameter when making a Conduit request, even if the value is empty (e.g., provide '{}').
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:423 (0x42a9e9)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:34 (0x5110dc)
/Users/etcinit/go/src/github.com/etcinit/phabulous/app/controllers/feed.go:26 (0x51265a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x512b2a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/logger.go:56 (0x523fd1)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x512b2a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/recovery.go:43 (0x524b31)
/Users/etcinit/go/src/github.com/gin-gonic/gin/context.go:95 (0x512b2a)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:294 (0x519582)
/Users/etcinit/go/src/github.com/gin-gonic/gin/gin.go:275 (0x5191b7)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1862 (0x5d05be)
/usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go:1361 (0x5cdbfe)
/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 (0x45bf01)

Add filtering tools to reduce noise

It'd be great to be able to filter messages based on type. For example, we'd like messages for a repository that are:

  • new diffs
  • accept/request change to diff
  • closed diff

but not:

  • added comment
  • added inline comment
  • updated diff
  • updated summary

Let me know if there's a way to do this already and I just missed it :)

React on any mention of a TXXX or DXXX

Given that I am in a slack channel together with phabulous
When I write something like "Please have a look at T1000"
Then phabulous should write: "T1000: ticket description"
But instead phabulous is silent

Is there an option to enable this already? If not, it would be nice to have this, maybe configurable. I would be willing to create a pull request for this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.