-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comment on pull requests with GitHub Actions #322
Comments
Here is what an example comment could look like: Actions build 483333557 for commit a0b98d3 by XXXXX is now complete. The rendered manuscript from this build is temporarily available. see build log
including the output of the build log would be helpful for spotting warnings. |
This is awesome! Looking forward to unifying all the build rules under GitHub Actions. Some feedback:
|
This is great. I have a slight preference for the AppVeyor comments that directly link the manuscript pdf and html instead of zipping them. However, I see benefits to this zip file that has additional outputs that can help with debugging. I agree with @olgabot that the "GitHub Actions" phrasing is helpful. I'm okay with pull request artifacts being temporary. @olgabot all of the manuscripts that are built from the master branch and deployed are archived and versioned. For example, historical rootstock manuscripts are in https://github.com/manubot/rootstock/tree/gh-pages/v |
Just heard parts of a great presentation by @abhisuri97 on CI. He mentioned the
It actually seems like GitHub Action artifacts aren't automatically deleted according to actions/upload-artifact#9. Although at some point you may hit a repo artifact quota... not quite sure. |
@dhimmel these GitHub Actions could be quite helpful for the COVID-19 review. I may be able to make some time to work on it over the next few days. Should I start by looking at the Those questions would mostly pertain to what is available through the GitHub API because I haven't worked with it much. |
Yes feel free to take the lead here and I can answer any questions you may have or help deal with GitHub Issue quirks. |
I did some testing.
@dhimmel I'm planning to extend the "Upload Artifacts" step to construct a comment message similar to what you have above and store it in an environment variable. Then, the new comment workflow step would make that comment in the pull request. Is that what you had in mind? I don't expect this approach would support including the full build log in the comment. |
You probably want a new step so it can have it's own Using |
Getting the artifact URL seems like a dead end. There isn't support for lasting URLs per actions/upload-artifact#60 Even constructing the artifact URL is nowhere near as straightforward as it was with AppVeyor. I don't see the ids in the artifact URL in the GitHub context in the workflow. Unless I'm missing something, my conclusion is that GitHub Actions artifacts aren't mature enough to support what we want. |
And it looks like I'd still be interested in you opening a draft PR with your progress. We might want to comment with other information like log output, so hopefully we'll have a chance to use much of this work someday. |
Given that #327 has hit some dead ends, mainly the lack of persistent URLs for artifacts and permissions problems, maybe we should consider another approach. Another option would be a ChatOps approach where a user comments on a PR with The COVID-19 issue labeler is somewhat similar. Or perhaps AppVeyor is the best solution for now. |
Does this mean that the PDF would be stored as a file attachment in the comment as a workaround to the artifact URL problem? That would be a clever approach. We'd have to explore how to automate file attachments. |
Yes, but it looks like attachments on comments via the API are not supported as per isaacs/github#1133. |
How does JOSS do it? e.g see this comment which links to a PDF on GitHub: openjournals/joss-reviews#1584 (comment) |
Also this is cool! Will share widely |
JOSS runs servers where @whedon lives and responds to mentions. Thus far we've avoiding having to maintain any manubot servers, both for sustainability as well as decentralization. Currently, once you create a manuscript you are no longer dependent on any centralized manubot services. And manubot runs in a serverless manner since all computation is outsourced to GitHub Actions / CI. |
Currently GitHub actions stores artifacts with rendered manuscript for pull request builds. However, Actions do not leave comments on pull requests. AppVeyor does leave comments, but requires using an additional CI service and duplicating computation.
Therefore, it'd simplify things if we could have GitHub Actions comment on PR, perhaps as an optional feature. Users such as @olgabot and @agitter have indicated they like the convenience of PR comments. PR comments are also good for users that don't have a deep understand of CI and are better suited with ChatOps style interfaces.
It looks like there are already PR comment actions:
Related issues that we've addressed:
The text was updated successfully, but these errors were encountered: