Skip to content

POC: Configure ipa-validation-ruleset package #840

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

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
31f7e19
remove unused dependency
sphterry Jul 22, 2025
486c87b
draft semantic commit check based on IPA repo workflow
sphterry Jul 22, 2025
13c28d4
Merge branch 'main' into CLOUDP-329998
sphterry Jul 22, 2025
20bdda6
Draft package.json with broken tests
sphterry Jul 22, 2025
476a6f6
Fix for jest testing
sphterry Jul 22, 2025
96b19b6
Ignore node modules for spectral
sphterry Jul 22, 2025
b656e58
Install changelog action and generate sample changelog
sphterry Jul 22, 2025
2b6cc71
Change to apply semantic commit check to entire repo
sphterry Jul 22, 2025
9aa63ff
changes
sphterry Jul 22, 2025
3a073af
Revert "changes"
sphterry Jul 22, 2025
c2bc6db
changes
sphterry Jul 22, 2025
01c89f5
Revert "changes"
sphterry Jul 22, 2025
9060dda
Merge branch 'main' into CLOUDP-329998
sphterry Jul 22, 2025
4bb2502
Update README with quick links, package.json description, added prett…
sphterry Jul 22, 2025
b3f5c12
Draft package publish workflow
sphterry Jul 23, 2025
58c8dd2
Added generate changelog script
sphterry Jul 23, 2025
1355fca
Added changelog check to publish action
sphterry Jul 23, 2025
97d07d3
Merge branch 'main' into CLOUDP-329998
sphterry Jul 23, 2025
84ef351
Added changelog script to parent directory
sphterry Jul 23, 2025
813ba03
fix: changelog workflow
sphterry Jul 23, 2025
a5d66dc
docs: update contributing.md with override details
sphterry Jul 23, 2025
9486687
docs: update usage details
sphterry Jul 23, 2025
520614f
fix: move changelog check to code-health
sphterry Jul 23, 2025
211355c
Changelog update
sphterry Jul 23, 2025
e48a668
Try different checkout
sphterry Jul 23, 2025
9842e37
debug changelog
sphterry Jul 23, 2025
22a890c
fix setup node version
sphterry Jul 23, 2025
5c8bf28
fix license
sphterry Jul 23, 2025
6843972
Fix package with ruleset exporT
sphterry Jul 24, 2025
158e3cd
Change token name
sphterry Jul 24, 2025
a34a9ff
Move package into ipa directory
sphterry Jul 24, 2025
db9bf44
Move package logic into ipa
sphterry Jul 24, 2025
a4c5ecc
Merge branch 'main' into CLOUDP-329998
sphterry Jul 24, 2025
0a0a99f
Updates to publish workflow
sphterry Jul 24, 2025
a86a242
Attempt manual workflow trigger
sphterry Jul 24, 2025
46a00c4
Attempt manual workflow trigger
sphterry Jul 24, 2025
c1c119e
Attempt manual workflow trigger
sphterry Jul 24, 2025
409070c
Test update .github/workflows/spectral-publish.yml
sphterry Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/semantic-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Semantic Commit Check

on:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
semantic-commit:
runs-on: ubuntu-latest
name: Check Semantic Commits
steps:
- name: Checkout repository
Copy link
Member

@wtrocki wtrocki Jul 25, 2025

Choose a reason for hiding this comment

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

[FYI] Checkout of the repository is optional step if your action does not need repository (uses GH API you can skip it)

uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
sparse-checkout: |
openapi/
tools/spectral
Comment on lines +15 to +17
Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of this checkout?

- name: Check PR title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
requireScope: false
subjectPattern: "^[A-Z].+[^.]$"
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
starts with an uppercase letter and doesn't end with a period.
validateSingleCommit: false
41 changes: 41 additions & 0 deletions .github/workflows/spectral-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish IPA Validation Framework Package

on:
workflow_dispatch:
push:
branches:
- main
- CLOUDP-329998
Copy link
Member

Choose a reason for hiding this comment

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

Reminder to remove it before merge

paths:
- 'tools/spectral/ipa/**'
Copy link
Member

Choose a reason for hiding this comment

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

[nit] Do we want to publish on non code changes like Readme.md


jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g conventional-changelog-cli
- name: Generate and Commit Changelog
run: |
npm run gen-ipa-changelog
git add tools/spectral/ipa/CHANGELOG.md
git commit -m "chore(changelog): Update changelog"
- name: Push Changelog
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
Comment on lines +26 to +27
Copy link
Member

@wtrocki wtrocki Jul 25, 2025

Choose a reason for hiding this comment

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

FYI: Unsure if that will work (we do have branch protection rules)

Copy link
Member

Choose a reason for hiding this comment

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

Image

Copy link
Member

Choose a reason for hiding this comment

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

I suggest we get changelog generated in separate PR.
You need specific filters and standards for changelog to be introduced for it to have any value.

publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- run: npm ci
- run: npm test
- uses: JS-DevTools/npm-publish@v3
Copy link
Member

@wtrocki wtrocki Jul 25, 2025

Choose a reason for hiding this comment

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

Security recommendation. Do not use tag for third party packages that deal with credentials.
Edit:
You could avoid using action and have a separate publish script etc.

Suggested change
- uses: JS-DevTools/npm-publish@v3
- uses: JS-DevTools/npm-publish@sha here
with:
token: ${{ secrets.IPA_VALIDATION_NPM_TOKEN }}
package: "tools/spectral/ipa/package.json"

with:
token: ${{ secrets.IPA_VALIDATION_NPM_TOKEN }}
package: "tools/spectral/ipa/package.json"
Loading
Loading