问题描述
我正在尝试将 phabricator 与 jabber 聊天集成.我创建了一个机器人,它会在 jabber 聊天中为每个新的提要查询向提交作者发送消息.我的要求是,如果提要故事是一个问题、审计或 commnet,我如何获得提交的原始作者.我想将提交时提出的任何问题通知提交者.我是否需要分析故事才能获得此信息?我该怎么做?
I am trying to integrate phabricator with jabber chat. I have created a bot that sends messages to the commit author in jabber chat for every new feed query. My requirement is that how do I get the original author of a commit if the feed story is a concern,audit or commnet. I want to notify the author of the commit of any concerns raised with his commit. Do I need to analyse the story to get this informaiton?How do I go about doing this?
提前致谢
推荐答案
story 对象应该有一个数据元素,其中包含有关作者和提交者的信息.像这样:
The story object should have a data element that will include information about the Author and committer. Like so:
"PHID-STRY-spjfpdv4wuigblmh3ygb" : {
"class" : "PhabricatorFeedStoryCommit",
"epoch" : 1409840112,
"authorPHID" : "PHID-USER-tcyihgi43sw6o7yrnhu5",
"chronologicalKey" : "6055220066741547443",
"data" : {
"commitPHID" : "PHID-CMIT-ievqiimtsnlfhlk5imqq",
"summary" : "[blah]",
"authorName" : "Author Name <author_email@example.com>",
"authorPHID" : "PHID-USER-tcyihgi43sw6o7yrnhu5",
"committerName" : "Commiter Name <commiter_email@example.com>",
"committerPHID" : "PHID-USER-tcyihgi43sw6o7yrnhu5"
}
}
如果没有,它应该有一个 objectPHID:
If not, it should have an objectPHID:
"PHID-STRY-mqlkjzwkbr3th4h5n2eg" : {
"class" : "PhabricatorApplicationTransactionFeedStory",
"epoch" : 1409841382,
"authorPHID" : "PHID-USER-2bubef6xonwicvaool4w",
"chronologicalKey" : "6055222630292077307",
"data" : {
"objectPHID" : "PHID-CMIT-is7pmo5nyvv4eruq2msn",
"transactionPHIDs" : [
"PHID-XACT-CMIT-svvkzf7dfplzdxp"
]
}
}
您可以使用管道调用从那里查询.
You can query from there using conduit calls.
这篇关于phabricator 从关注、评论和审计的故事的提要故事中获取提交作者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!