Skip to content
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

feat: add a new action to validate contribution to the bonita documentation content #115

Merged
merged 12 commits into from
Oct 19, 2023

Conversation

benjaminParisel
Copy link
Collaborator

@benjaminParisel benjaminParisel commented Jul 21, 2023

Create action to validate the contribution follow our documentation guidelines.

A test PR is opened in bonita-labs-doc to play with this new action

This PR is the first iteration of action to check contribution.

@benjaminParisel benjaminParisel changed the title ci: wip check PR contribution ci(action): First iteration of action to check contribution Jul 21, 2023
@benjaminParisel benjaminParisel force-pushed the ci/check-pr-guidelines branch 17 times, most recently from 0d3ba32 to 92c5d93 Compare October 12, 2023 11:56
* Adding forbidden pattern Step check
* Adding Attributes Step check
* Use Eslint and fix error
* remove test parts
* improve Readme
packages/pr-files-checker/action.yml Outdated Show resolved Hide resolved
packages/pr-files-checker/README.md Outdated Show resolved Hide resolved
packages/pr-files-checker/README.md Outdated Show resolved Hide resolved
packages/pr-files-checker/README.md Outdated Show resolved Hide resolved
@tbouffard
Copy link
Member

I have just tested the action with bonitasoft/bonita-labs-doc#148. Everything run fine 💪🏿

  • detect errors in navbar/taxonomy files
  • The PR comment is removed when there is no more errors
  • several errors in the same file. One checkbox by file, all errors are displayed on the same line
  • errors detected in Antora "partials"

@tbouffard
Copy link
Member

❓ This new action seems to be usable only in the context of Antora and AsciiDoc. So, I suggest we find a better name.
Here are some proposals (none of these proposals satisfied me 😸 but they are better than pr-files-checker IMHO):

  • pr-antora-content-checker
  • pr-antora-diff-checker
  • ....

@benjaminParisel benjaminParisel marked this pull request as ready for review October 18, 2023 14:11
Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some suggestions to improve the wording.
I will check the action in the bonita-labs-doc repository soon.

README.md Outdated Show resolved Hide resolved
packages/pr-antora-content-guidelines-checker/src/main.ts Outdated Show resolved Hide resolved
packages/pr-antora-content-guidelines-checker/src/main.ts Outdated Show resolved Hide resolved
Co-authored-by: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com>
@tbouffard tbouffard changed the title ci(action): First iteration of action to check contribution feat: add a new action to validate contribution to the bonita documentation content Oct 19, 2023
@tbouffard
Copy link
Member

❌ There is an error when running the actoin commit 0bacfa1 (https://github.com/bonitasoft/bonita-labs-doc/actions/runs/6561671422/job/17821868367?pr=148) or 62dad28 (https://github.com/bonitasoft/bonita-labs-doc/actions/runs/6571494407/job/17850750270?pr=148)

Download action repository 'bonitasoft/actions@ci/check-pr-guidelines' (SHA:0bacfa174c99d1a453fa1cc85d6df56e10977e2d)
Error: bonitasoft/actions/ci/check-pr-guidelines/packages/pr-antora-content-guidelines-checker/action.yml: (Line: 1, Col: 46, Idx: 45) - (Line: 1, Col: 81, Idx: 80): While parsing a block mapping, did not find expected key.
Error: System.ArgumentException: Unexpected type '' encountered while reading 'action manifest root'. The type 'MappingToken' was expected.
   at GitHub.DistributedTask.ObjectTemplating.Tokens.TemplateTokenExtensions.AssertMapping(TemplateToken value, String objectDescription)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
Error: Fail to load bonitasoft/actions/ci/check-pr-guidelines/packages/pr-antora-content-guidelines-checker/action.yml

@benjaminParisel
Copy link
Collaborator Author

❌ There is an error when running the actoin commit 0bacfa1 (https://github.com/bonitasoft/bonita-labs-doc/actions/runs/6561671422/job/17821868367?pr=148) or 62dad28 (https://github.com/bonitasoft/bonita-labs-doc/actions/runs/6571494407/job/17850750270?pr=148)

Download action repository 'bonitasoft/actions@ci/check-pr-guidelines' (SHA:0bacfa174c99d1a453fa1cc85d6df56e10977e2d)
Error: bonitasoft/actions/ci/check-pr-guidelines/packages/pr-antora-content-guidelines-checker/action.yml: (Line: 1, Col: 46, Idx: 45) - (Line: 1, Col: 81, Idx: 80): While parsing a block mapping, did not find expected key.
Error: System.ArgumentException: Unexpected type '' encountered while reading 'action manifest root'. The type 'MappingToken' was expected.
   at GitHub.DistributedTask.ObjectTemplating.Tokens.TemplateTokenExtensions.AssertMapping(TemplateToken value, String objectDescription)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
Error: Fail to load bonitasoft/actions/ci/check-pr-guidelines/packages/pr-antora-content-guidelines-checker/action.yml

Fixed ! It's a bad copy/paste :(

Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good job, this was a tough one!

@benjaminParisel benjaminParisel merged commit 2d675f0 into main Oct 19, 2023
2 checks passed
@benjaminParisel benjaminParisel deleted the ci/check-pr-guidelines branch October 19, 2023 09:19
@tbouffard tbouffard added the enhancement New feature or request label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants