Each game will need to link its GitHub repo to a corresponding Allegro Planet project in order to trigger builds. To do that, each user will need to create a webhook on their GitHub's project page, and grab a unique webhook URL from their Allegro Planet project to plug into there. An example endpoint generated by Allegro Planet for their project might look something like this:
This URL can be generated and there can only be one per project. (For now, these can be generated by an admin and passed onto the user. Eventually, the user can "opt-in" to GitHub builds and generate this URL in their project settings).
Correspondingly, Allegro Planet will need to keep track of the GitHub "events" that are posted to its webhook endpoints. As a result, a GithubWebhookEvent is used (and the payload stored) when a webhook callback is made to that address. Consequently, this PR repurposes the name GithubWebook to represent an endpoint that a repo will post to for that project.
Also in This PR
a new assertion assert_association that can be used to validate model associations in tests. This replaces a slightly less elegant solution that was already in place.
GithubWebhookEvents are now nested inside Game > GithubWebhook, and can only be accessed publically through that path
a new StringFormatValidator format rule for uuid 🎉
Allow for Per-Project GitHub Webhook Addresses
Each game will need to link its GitHub repo to a corresponding Allegro Planet project in order to trigger builds. To do that, each user will need to create a webhook on their GitHub's project page, and grab a unique webhook URL from their Allegro Planet project to plug into there. An example endpoint generated by Allegro Planet for their project might look something like this:
This URL can be generated and there can only be one per project. (For now, these can be generated by an admin and passed onto the user. Eventually, the user can "opt-in" to GitHub builds and generate this URL in their project settings).
Correspondingly, Allegro Planet will need to keep track of the GitHub "events" that are posted to its webhook endpoints. As a result, a
GithubWebhookEvent
is used (and the payload stored) when a webhook callback is made to that address. Consequently, this PR repurposes the nameGithubWebook
to represent an endpoint that a repo will post to for that project.Also in This PR
assert_association
that can be used to validate model associations in tests. This replaces a slightly less elegant solution that was already in place.GithubWebhookEvent
s are now nested insideGame
>GithubWebhook
, and can only be accessed publically through that pathStringFormatValidator
format rule foruuid
🎉Related: #55