specifications icon indicating copy to clipboard operation
specifications copied to clipboard

Spec PR review action - POC

Open lukasj opened this issue 4 years ago • 4 comments

Defines a workflow for verification of specification PRs.

The workflow is currently set to react on PRs to master/main branch IF the PR description contains Specification PR template. It also runs after every modification of such PR.

The "custom" nodejs based action included here takes a list of modified files within the PR and PR description as an input, goes through the 1st group of checks defined by the spec_review_checklist.md and outputs findings as MD formatted text

The workflow then adds this output as a comment to the PR (the comment is either created or updated after each modification of the PR/action run)

lukasj avatar Sep 09 '21 13:09 lukasj

✔️ Deploy Preview for jakartaee-specifications ready!

🔨 Explore the source changes: e2bc26cc1816179a2433c72c9adc317dac512c96

🔍 Inspect the deploy log: https://app.netlify.com/sites/jakartaee-specifications/deploys/613a0c0e349337000890d8ad

😎 Browse the preview: https://deploy-preview-421--jakartaee-specifications.netlify.app

netlify[bot] avatar Sep 09 '21 13:09 netlify[bot]

Whatever you think is the best, I only need to know where to (re-)create this PR... One drawback I can see is in syncing changes between those two repos. On the benefits side, "test" won't spam this repo and it may be easier to distinguish between dev and stable versions. Compiled version should also run faster - but I do not think speed matters that much in this particular case.

...and forgot to mention that for current testing, one can use my repo: https://github.com/lukasj/repo

lukasj avatar Sep 10 '21 16:09 lukasj

So after I had a base rewritten in typescript I started trying to test it in my fork repo, I ran into problems due to the issues described here: https://github.community/t/github-actions-are-severely-limited-on-prs/18179/8

Since creating PRs from forks is how we do reviews, it seems github actions are unusable, however I'm not clear on if the problem is because I'm testing in the fork repo. Maybe we need to merge a simple workflow to test if an action is able to add/update comments on the specifications repo.

Now I'm just looking at creating an action using the following rest api java binding: https://github.com/hub4j/github-api.git

This can be run externally, or via docker I suppose.

starksm64 avatar Oct 06 '21 03:10 starksm64

Here is an example of doing the same work to check a PR and update a comment as the action was doing using the org.kohsuke:github-api GitHub REST binding for Java. Of course this needs to be run manually rather than from a workflow event. https://github.com/jakartaredhat/githubactions/blob/main/src/test/java/jakarta/PRTests.java

The work to update @lukasj POC into TypeScript is available in the actions branch of this repo: https://github.com/jakartaredhat/specifications/tree/actions

It only has the first check regarding conformance to the PR template ported since I could not get past the permission errors to create a comment from this forked repo.

starksm64 avatar Oct 06 '21 14:10 starksm64