在 GIT 推送上接收电子邮件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7015300/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:48:23  来源:igfitidea点击:

Receiving emails on GIT push

gitgithubgithooksgit-push

提问by Dofs

I am used to subversion, where the collaborate group would receive an email whenever someone commits. Is there a similar feature on GitHub, so the people working on the repository receives an email whenever a user pushes their changes?

我习惯于颠覆,只要有人提交,协作组就会收到一封电子邮件。GitHub 上是否有类似的功能,以便在用户推送更改时在存储库上工作的人员会收到一封电子邮件?

回答by Matija

Here is the simplest solution I've found:

这是我找到的最简单的解决方案:

1) Log in to your gitHub account on github.com

1)登录到您的GitHub的帐户github.com

2) In the main tab click on Settings

2)在主选项卡中单击设置

3) From the main navigation of Servicesfind Emailand click it

3) 从服务的主导航中找到电子邮件并单击它

4) Fill in your email address in field Address

4) 在字段地址中填写您的电子邮件地址

5) Check the checkbox Send from Author

5) 选中从作者发送的复选框

6) Check the checkbox Active

6) 选中复选框活动

7) Click on Update Settings

7) 点击更新设置

Optional: You can click on Test Hookfor testing, check your inbox you should receive email. -> Will become available when you finish Update Settings in step 7)

可选:您可以单击Test Hook进行测试,检查您应该收到电子邮件的收件箱。->将在您完成第 7 步中的更新设置后变为可用)

Also there are images made according to the process:

还有按照流程制作的图片:

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

And now for the grand finalI have the answer which is tested and approved at my side.

现在对于总决赛,我得到了在我身边经过测试和批准的答案。

How to send email to ALL development team members, when gitHub's Service Hooks->Email allows only at most 2 recipients }.

当 gitHub 的 Service Hooks->Email 最多只允许 2 个收件人时,如何向所有开发团队成员发送电子邮件 }.

The answer is combination of Service Hook->Email @ GitHub && Google groups

答案是Service Hook->Email@GitHub && Google 组的组合

  1. First login to your google account
  2. Go to Google Groupsand at the top click on Create Group
  3. Type in Group Name, Group email address (will copy/paste into GitHub Service Hook->Email Address), Group description
  4. After that hit Create button at the top, your new group should be created now
  5. After that in the menu to the left hit Invite membersand type in the email addresses of your team mates
  6. After that hit Send invites(when your members accept invitation) they are now formally members of this group
  7. In the menu on the left click on All Membersand check the 4th column called Delivery, every team member should have option All Email.
  8. After that I would like to credit Mr. Clement Escoffierand please do follow his guidelines @ Clement Escoffier::Send Github commits to a Google Groupon how to finish it. {Thank you Clement :)}
  9. If the link becomes unavailable here is another link to my gDocs @ PDF version of Clements guide
  1. 首先登录你的谷歌账户
  2. 转到Google Groups并在顶部单击Create Group
  3. 输入群组名称、群组电子邮件地址(将复制/粘贴到 GitHub 服务挂钩->电子邮件地址)、群组描述
  4. 在点击顶部的创建按钮之后,您的新组现在应该被创建
  5. 然后在左侧的菜单中点击邀请成员并输入您团队成员的电子邮件地址
  6. 之后点击发送邀请(当您的成员接受邀请时)他们现在正式成为该组的成员
  7. 在左侧菜单中单击所有成员并检查名为Delivery的第 4 列,每个团队成员都应该有选项 All Email
  8. 在那之后,我想感谢 Clement Escoffier 先生,请务必遵循他的指导方针 @ Clement Escoffier::Send Github 向 Google Group 提交关于如何完成它的承诺。{谢谢克莱门特:)}
  9. 如果链接变得不可用,这里是另一个链接到我的 gDocs @ PDF 版本的 Clements 指南

2018 update: github will discontinue this service in Oct 2018

2018 更新:github 将于 2018 年 10 月停止此服务

回答by Tim Hoolihan

You would use a post-hook, check out info at:

您将使用 post-hook,请在以下位置查看信息:

http://help.github.com/post-receive-hooks/

http://help.github.com/post-receive-hooks/

http://wiki.webhooks.org/w/page/13385124/FrontPage

http://wiki.webhooks.org/w/page/13385124/FrontPage

There is a posthook named "Email", it only accepts one email address to send to, but it could be a distribution list.

有一个名为“电子邮件”的 posthook,它只接受一个电子邮件地址发送,但它可以是一个分发列表。

回答by Joseph A. Levin

I think you want to look at the email service hook.

我想你想看看电子邮件服务挂钩。

回答by Hari K T

To me I think you can have a look at Git Pull Request Email Bot

对我来说,我想你可以看看 Git Pull Request Email Bot

https://github.com/samwho/GitHub-Pull-Request-Email-Bot

https://github.com/samwho/GitHub-Pull-Request-Email-Bot

A short description from the project page

项目页面的简短描述

What is this?

这是什么?

The Git Pull Request Email Bot is a simple project that sends emails to a specified address every time a repository of your choice gets a pull request.

Git Pull Request Email Bot 是一个简单的项目,每次您选择的存储库收到拉取请求时,它都会向指定地址发送电子邮件。

It works by adding the run.php file to a Cron job and running it fairly often (though it doesn't really matter how long you leave it, it remembers what pull request it emailed you about last and won't email duplicates).

它的工作原理是将 run.php 文件添加到 Cron 作业并相当频繁地运行它(尽管你离开它多长时间并不重要,它会记住它最后通过电子邮件发送给你的拉取请求,并且不会通过电子邮件发送重复)。

It was originally written for the ThinkUp project to post pull requests to the mailing list and promote code review.

它最初是为 ThinkUp 项目编写的,用于将拉取请求发布到邮件列表并促进代码。

Edit:

编辑

For the post request its good as @Tim Hoolihan says.

对于帖子请求,正如@Tim Hoolihan 所说的那样。

You can make a php page or so and get the post values I guess. Not tried .

您可以制作一个 php 页面左右,并获得我猜的帖子值。没试过。

回答by Mark Swardstrom

The "Test Hook" button shows up when you click on the 'active' checkbox. And it needs to be active to send email (if that's not obvious).

单击“活动”复选框时,会显示“测试挂钩”按钮。并且它需要处于活动状态才能发送电子邮件(如果这不明显)。

回答by Kisanagaram

In continuation to post by "mcs"

继续通过“mcs”发帖

In Google Groups, go to your group, navigate to Manage-> Permissions -> Posting Permissions-> In "Post" drop down select "Public" and save the selections.

在 Google Groups 中,转到您的群组,导航至管理 -> 权限 -> 发帖权限 -> 在“发帖”下拉菜单中选择“公开”并保存选择。

(I don't have enough reputation to post comment to "mcs" answer, so posting here)

(我没有足够的声誉对“mcs”答案发表评论,所以在这里发帖)