CI: Add Many-Worlds build link to Commit Status

So [Many-Worlds] is this thing I hacked together on Gomix that can fetch,
build, and serve any branch, PR, or commit of MathQuill, on demand. For
example, if you go to:

  http://many-worlds.gomix.me/mathquill/mathquill/branch/master/test/unit.html

then it will fetch the latest `master` branch, run `make test`, then
delegate to a static file server to serve `test/unit.html` and
`build/mathquill.test.js` and all that good stuff.

[Many-Worlds]: https://gomix.com/#!/project/many-worlds

Currently, though, manually formatting that URL is the only way to use
it. What would be nice is if an auto-generated URL were generated per
branch or PR or commit or something and available on GitHub, so you
could just click a link to try out a PR. We could automatically post a
comment on new PRs, but that would spam PR authors with notifications.

A better, quieter way is to use the GitHub Commit Status API:
https://developer.github.com/v3/repos/statuses/

This lets us quietly attach a link to every commit built by CircleCI
without spamming anyone with notifications, and lets you try out
intermediate commits on a PR; not just the tip, every push.

Authentication
--------------

CircleCI doesn't provide us with the token they use for their status
update, probably for good security reasons, but this is exactly what the
MathQuillBot GitHub bot user is for.

`$GITHUB_STATUS_API_KEY` is a [personal access token] for MathQuillBot
limited to the [`repo:status`] authorization scope (so this token can't
be used to write to anything other than commit statuses) that I've added
to the build environment.

[personal access token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
[`repo:status`]: https://developer.github.com/v3/oauth/#scopes
1 file changed
tree: 4cd8ea5f9660b51e0999b4b89f94673bfb786de2
  1. docs/
  2. script/
  3. src/
  4. test/
  5. .gitattributes
  6. .gitignore
  7. BUILDING
  8. CHANGELOG.md
  9. circle.yml
  10. Makefile
  11. mkdocs.yml
  12. package.json
  13. quickstart.html
  14. README.md
README.md

MathQuill

by Han, Jeanine, and Mary (maintainers@mathquill.com)

MathQuill is a web formula editor designed to make typing math easy and beautiful.

The MathQuill project is supported by its partners. We hold ourselves to a compassionate Code of Conduct.

MathQuill is resuming active development and we‘re committed to getting things running smoothly. Find a dusty corner? Let us know in Slack. (Prefer IRC? We’re #mathquill on Freenode.)

Getting Started

MathQuill has a simple interface. This brief example creates a MathQuill element and renders, then reads a given input:

var htmlElement = document.getElementById('some_id');
var config = {
  handlers: { edit: function(){ ... } },
  restrictMismatchedBrackets: true
};
var mathField = MQ.MathField(htmlElement, config);

mathField.latex('2^{\\frac{3}{2}}'); // Renders the given LaTeX in the MathQuill field
mathField.latex(); // => '2^{\\frac{3}{2}}'

Check out our Getting Started Guide for setup instructions and basic MathQuill usage.

Docs

Most documentation for MathQuill is located on ReadTheDocs.

Some older documentation still exists on the Wiki.

Open-Source License

The Source Code Form of MathQuill is subject to the terms of the Mozilla Public License, v. 2.0: http://mozilla.org/MPL/2.0/

The quick-and-dirty is you can do whatever if modifications to MathQuill are in public GitHub forks. (Other ways to publicize modifications are also fine, as are private use modifications. See also: MPL 2.0 FAQ)