Skip to content

Commit f696c67

Browse files
committed
notifications and special files
1 parent acd8019 commit f696c67

File tree

5 files changed

+72
-5
lines changed

5 files changed

+72
-5
lines changed
565 KB
Loading
444 KB
Loading
384 KB
Loading

book/06-github/sections/2-contributing.asc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ image::images/blink-04-pr-comment.png[PR line comment]
139139

140140
Once the maintainer makes this comment, the person who opened the Pull Request (and indeed, anyone else watching the repository) will get a notification. We'll go over customizing this later, but if you have email notifications turned on, Tony would get an email like this:
141141

142+
[[_email_notification]]
142143
.Comments sent as email notifications
143144
image::images/blink-04-email.png[Email notification]
144145

book/06-github/sections/3-maintaining.asc

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,80 @@ image::images/maint-06-unsubscribe.png[Unsubscribe]
227227

228228
===== The Notifications Page
229229

230-
- how to customize notifications
231-
- web
232-
- email / email headers
230+
When we mention ``notifications'' here with respect to GitHub, we mean a specific way that GitHub tries to get in touch with you when events happen and there are a few different ways you can configure them.
231+
If you go to the ``Notification center'' tab from the settings page, you can see some of the options you have.
232+
233+
.Notification center options.
234+
image::images/maint-07-notifications.png[Notifiation center]
235+
236+
The two choices are to get notifications over ``Email'' and over ``Web'' and you can choose either, niether or both for when you actively participate in things and for activity on repositories you are watching.
237+
238+
====== Web Notifications
239+
240+
Web notifications only exist on GitHub and you can only check them on GitHub. If you have this option selected in your preferences and a notification is triggered for you, you will see a small blue dot over your notifications icon at the top of your screen as seen in <<_not_center>>.
241+
242+
[[_not_center]]
243+
.Notification center.
244+
image::images/maint-08-notifications-page.png[Notifiation center]
245+
246+
If you click on that, you will see a list of all the items you have been notified about, grouped by project. You can filter to the notifications of a specific project by clicking on it's name in the left hand sidebar. You can also acknowledge the notifiction by clicking the checkmark icon next to any notification, or acknowledge _all_ of the notifictions in a project by clicking the checkmark at the top of the group. There is also a mute button next to each checkmark that you can click to not receive any further notifications on that item.
247+
248+
All of these tools are very useful for handling large numbers of notifications. Many GitHub power users will simply turn off email notifications entirely and manage all of their notifications through this screen.
249+
250+
====== Email Notifications
251+
252+
Email notifications are the other way you can handle notifications through GitHub. If you have this turned on you will get emails for each notification. We saw examples of this in <<_email_notification>> and <<_email_pr>>. The emails will also be threaded properly, which is nice if you're using a threading email client.
253+
254+
There is also a fair amount of metadata embedded in the headers of the emails that GitHub sends you, which can be really helpful for setting up custom filters and rules.
255+
256+
For instance, if we look at the actual email headers sent to Tony in the email shown in <<_email_pr>>, we will see the following among the information sent:
257+
258+
[source,mbox]
259+
----
260+
To: tonychacon/fade <[email protected]>
261+
Message-ID: <tonychacon/fade/pull/[email protected]>
262+
Subject: [fade] Wait longer to see the dimming effect better (#1)
263+
X-GitHub-Recipient: tonychacon
264+
List-ID: tonychacon/fade <fade.tonychacon.github.com>
265+
List-Archive: https://github.com/tonychacon/fade
266+
List-Post: <mailto:[email protected]>
267+
List-Unsubscribe: <mailto:[email protected]>,...
268+
X-GitHub-Recipient-Address: [email protected]
269+
----
270+
271+
There are a couple of interesting things here. If you want to highlight or re-route emails to this particular project or even Pull Request, the information in `Message-ID` gives you all the data in `<user>/<project>/<type>/<id>` format. If this were an issue, for example, the `<type>` field would have been ``issues'' rather than ``pull''.
272+
273+
The `List-Post` and `List-Unsubscribe` fields mean that if you have a mail client that understands those, you can easily post to the list or ``Unsubscribe'' from the thread. That would be essentially the same as clicking the ``mute'' button on the web version of the notification or ``Unsubscribe'' on the Issue or Pull Request page itself.
274+
275+
It's also worth noting that if you have both email and web notifications enabled and you read the email version of the notification, the web version will be marked as read as well if you have images allowed in your mail client.
233276

234277
==== Special Files
235278

236-
- CONTRIBUTING file
237-
- README rendering
279+
There are a couple of special files that GitHub will notice if they are present in your repository.
280+
281+
==== README
282+
283+
The first is the `README` file, which can be of nearly any format that GitHub recognizes as prose. For example, it could be `README`, `README.md`, `README.asciidoc`, etc. If GitHub sees a README file in your source, it will render it on the landing page of the project.
284+
285+
Many teams use this file to hold all the relevant project information for someone who might be new to the repository or project. This generally includes things like:
286+
287+
* What the project is for
288+
* How to configure and install it
289+
* An example of how to use it or get it running
290+
* The license that the project is offered under
291+
* How to contribute to it
292+
293+
Since GitHub will render this file, you can embed images or links in it for added ease of understanding.
294+
295+
==== CONTRIBUTING
296+
297+
The other special file that GitHub recognizes is the `CONTRIBUTING` file. If you have a file named `CONTRIBUTING` with any file extension, GitHub will show <<_contrib_file>> when anyone starts opening a Pull Request.
298+
299+
[[_contrib_file]]
300+
.Opening a Pull Request when a CONTRIBUTING file exists.
301+
image::images/maint-09-contrib.png[Contributing notice]
302+
303+
The idea here is that you can specify specific things you want or don't want in a Pull Request sent to your project. This way people may actually read the guidelines before opening the Pull Request.
238304

239305
==== Project Administration
240306

0 commit comments

Comments
 (0)