Display repository description

Let’s try interacting with the GitHub API. As usual, we create an
`XMLHttpRequest`, hook up an event handler, and send the request.

For now, I hardcoded the repository owner and name. In future, they can
be taken from the URL query string.

Also, for simplicity, I treat the description as plain text; I will get
to Markdown formatting later.
Factor out AJAX mechanics

Before we display the list of commits, notice that a single API request
requires quite a few lines of code. Let’s factor out all the repeating
steps in a function.

The two things that change from one API call to another are the URL and
the handler function. However, the handler will always need to parse a
JSON response.
Show list of commits

Let’s now fetch the list of commits and show their summaries, with links
to the same page but with a ?sha=xxxxxx query parameter.

The regular expression there splits a commit message into the summary
and the body, using the topmost sequence of two consecutive newlines as
the separator; if there is none, considers the whole message to be the
summary. The `[^\0]` pattern matches any character including newline but
not including the null character (though hopefully nobody in their right
mind uses null characters in commit messages).