Skip to content

admin: migrate to centralized linting workflows#63

Merged
bigludo7 merged 11 commits intomainfrom
camara-admin/centralize-linting-workflows-1754567011736
Aug 22, 2025
Merged

admin: migrate to centralized linting workflows#63
bigludo7 merged 11 commits intomainfrom
camara-admin/centralize-linting-workflows-1754567011736

Conversation

@hdamker-bot
Copy link
Contributor

CAMARA Project Admin Update - Linting Setup

This pull request adds centralized linting workflows to ensure code quality and API specification compliance.

✅ Added Workflows

  • spectral-oas-caller.yml - Spectral linting with CAMARA ruleset for OpenAPI validation
  • pr_validation_caller.yml - Comprehensive PR validation checks

✨ Benefits

  1. Automated Quality Checks: Ensures API specifications meet CAMARA standards
  2. PR Validation: Automatic checks on all pull requests
  3. Always Current: Workflows reference centralized tooling for latest updates
  4. Zero Maintenance: No local configuration needed

📋 What This Means for You

  • Automated validation on all pull requests to main branch
  • Immediate feedback on API specification compliance
  • No local setup required - everything is managed centrally

🔧 Technical Details

The new workflows reference reusable workflows from:
camaraproject/tooling/.github/workflows/

This ensures all repositories benefit from:

  • Latest Spectral rules for OpenAPI validation
  • Consistent PR validation checks
  • Centralized rule management
  • Automated tooling updates

👥 Next Steps for Codeowners

⚠️ Since this repository had no prior linting, there may be existing issues to address.

⚠️ Important: This PR introduces linting workflows that will validate repository content. Linting errors will block this PR from merging until resolved.

Before This PR Can Be Merged:

  1. Review linting results in PR checks:

    • Check the "Checks" tab for workflow results
    • All linting errors must be resolved before merge is possible
  2. Fix linting errors directly in this PR:

    • Address all OpenAPI specification issues (Spectral and yamllint errors)
    • Address all test definitions issues (gherkin-lint errors)
    • Push fixes to this PR branch to re-trigger validation
    • Repeat until all checks pass successfully

Approve and merge this PR 🚀

After Successful Merge:

  1. Monitor the new linting system:

    • All future PRs will be subject to the same linting requirements
    • Contributors will need to fix linting issues before their PRs can merge
    • This ensures code quality standards are maintained going forward
  2. Test with additional rules (optional):

    • Verify OpenAPI specification with lower severity rules (warnings, hints, info)
    • Go to Actions tab → "Caller for Spectral linting with CAMARA ruleset" → Run workflow
    • Check workflow logs - if needed create an issue to improve your API specification
  3. Monitor future PRs:

    • First PRs after this may reveal new edge cases
    • Provide guidance to contributors on common linting fixes
    • The Release Management team can assist with complex issues

💡Pro tip: Running the Spectral workflow manually NOW is highly recommended. This allows you to fix issues proactively rather than discovering them when submitting your next feature PR!


🤖 Generated via project-admin workflow
Triggered by rartych, executed via hdamker-bot

➡️ Next Steps: This PR should be reviewed, fixed as needed, approved, and merged by repository codeowners following standard review processes.


This is a manually triggered automated administrative update.

Applied via project-admin workflow
Repository: DeviceSwap
Operation: centralize-linting-workflows
@github-actions
Copy link

github-actions bot commented Aug 7, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.01s
✅ API spectral 1 0 1.62s
✅ GHERKIN gherkin-lint 2 0 0.66s
✅ REPOSITORY git_diff yes no 0.0s
✅ REPOSITORY secretlint yes no 0.64s
✅ YAML yamllint 1 0 0.42s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@hdamker
Copy link
Contributor

hdamker commented Aug 20, 2025

@bigludo7 this PR will fix #14, but requires some work on the trailing spaces (in YAML) and indentation (in YAML, and especially Gherkin). You can to the changes directly here or in separate PR.

@bigludo7
Copy link
Collaborator

bigludo7 commented Aug 20, 2025

Edit: Jorge has validated #64 - no need for god intervention :)

@hdamker - thanks - Yes I will manage this one.
Resolution proposal: What about using your god ability to merge #64 as we have @fernandopradocabrillo approval & Jorge is off.
Then I craft the M4 PR where I manage this request.
WDYT?
I'm not super confortable to have several PR on same file at same time...

@hdamker
Copy link
Contributor

hdamker commented Aug 20, 2025

Then I craft the M4 PR where I manage this request.

Don't do the linting changes within the M4 PR ... you would need to merge the PR into main, and then sync this PR here to see the result ... but we want to see the successful checks before the approval of the M4 PR.

Best way is to follow the advice here in the PR:

Fix linting errors directly in this PR:

Address all OpenAPI specification issues (Spectral and yamllint errors)
Address all test definitions issues (gherkin-lint errors)
Push fixes to this PR branch to re-trigger validation
Repeat until all checks pass successfully

Copy link
Collaborator

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

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

Fixed all linting issue.

@bigludo7 bigludo7 merged commit a52b404 into main Aug 22, 2025
2 checks passed
@bigludo7 bigludo7 mentioned this pull request Aug 22, 2025
@hdamker hdamker deleted the camara-admin/centralize-linting-workflows-1754567011736 branch August 23, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants