diff options
author | 2020-12-10 13:39:17 +0100 | |
---|---|---|
committer | 2020-12-10 13:39:17 +0100 | |
commit | eacaf581ea5e0953c48f14c7f9801a0d661e6c89 (patch) | |
tree | e48e173088909e95868359ef0ab74bfdf1070f76 /bot | |
parent | Use workflow_run to send status embed to Discord (diff) |
Use Build Artifact to communicate PR information
A workflow run with a `workflow_run` payload does not contain the
necessary information to build a PR embed. As the old method of using
the API to fetch the relevant information turned out to be fragile (read
note 1 below) and the original Lint workflow already contains the
`pull_request` payload, we now store it as a build artifact.
The embed workflow then fetches the artifact and parses it to get the
relevant information out of it.
---
Note 1: Unfortunately, filtering Pull Requests using the "head"
parameter of the ``/repos/{owner}/{repo}/pulls` endpoint does not work
if the PR belongs to a fork with a different name than the base
repository: the API request will just return an empty array.
I've contacted GH to ask if this was intended or if it's a glitch, but,
for now, it's not a route that's easily available.
Diffstat (limited to 'bot')
0 files changed, 0 insertions, 0 deletions