Skip to content

Commit

Permalink
feat: Add conventionalsets action to project
Browse files Browse the repository at this point in the history
  • Loading branch information
kevintyj committed Nov 22, 2023
1 parent e58b9cb commit 73028da
Show file tree
Hide file tree
Showing 6 changed files with 3,671 additions and 418 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "packages/conventionalsets-action"]
path = packages/conventionalsets-action
url = https://github.com/kevintyj/conventionalsets-action.git
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export default antfu(
ignores: [
'**/dist',
'.idea',
'**/__fixtures__',
'packages/conventionalsets-action',
],
overrides: {
typescript: {
Expand Down
4 changes: 4 additions & 0 deletions packages/commitlint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ import { verifyTitle } from './lint';

type pullRequest = {
title: string
number: number
};

async function run(): Promise<void> {
const pullRequestPayload = github.context.payload.pull_request;

if (!pullRequestPayload?.title)
throw new Error('Pull Request or Title not found!');

const pullRequestObject: pullRequest = {
title: pullRequestPayload.title as string,
number: pullRequestPayload.number,
};

await verifyTitle(pullRequestObject.title, 'commitlint.config.js');
Expand Down
1 change: 1 addition & 0 deletions packages/conventionalsets-action
Loading

0 comments on commit 73028da

Please sign in to comment.