New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

advanced-commit-linter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advanced-commit-linter - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

7

dist/config.js

@@ -0,3 +1,4 @@

import { debug, getInput } from '@actions/core';
import { context } from '@actions/github';
import { configSchema } from './schema/config';
import { context } from '@actions/github';
export class Config {

@@ -20,3 +21,5 @@ constructor(config) {

static async getConfig(octokit) {
const retrievedConfig = await octokit.config.get(Object.assign(Object.assign({}, context.repo), { path: 'advanced-commit-linter.yml' }));
const path = getInput('config-path', { required: true });
const retrievedConfig = (await octokit.config.get(Object.assign(Object.assign({}, context.repo), { path }))).config;
debug(`Configuration '${path}': ${JSON.stringify(retrievedConfig)}`);
if (Config.isConfigEmpty(retrievedConfig)) {

@@ -23,0 +26,0 @@ throw new Error(`Missing configuration. Please setup 'Advanced Commit Linter' Action using 'advanced-commit-linter.yml' file.`);

@@ -61,3 +61,3 @@ import { TrackerValidator } from './tracker-validator';

generalTracker(commitsMetadata) {
var _a, _b;
var _a, _b, _c, _d;
if (this.config.isTrackerPolicyEmpty())

@@ -104,3 +104,9 @@ return undefined;

}
return Object.assign(Object.assign({}, tracker), { id: (_a = prUniqueTracker[0].data) === null || _a === void 0 ? void 0 : _a.id, url: (_b = prUniqueTracker[0].data) === null || _b === void 0 ? void 0 : _b.url, message: 'Tracker found', exception: prUniqueTracker[0].exception });
return {
id: (_a = prUniqueTracker[0].data) === null || _a === void 0 ? void 0 : _a.id,
type: (_c = (_b = prUniqueTracker[0].data) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : 'unknown',
url: (_d = prUniqueTracker[0].data) === null || _d === void 0 ? void 0 : _d.url,
message: 'Tracker found',
exception: prUniqueTracker[0].exception,
};
}

@@ -107,0 +113,0 @@ overallMessage(tracker, commitsMetadata) {

{
"name": "advanced-commit-linter",
"version": "2.0.1",
"version": "2.1.0",
"description": "Lint commit messages based on policy",

@@ -32,2 +32,3 @@ "main": "src/main.ts",

"@actions/github": "^5.1.1",
"@octokit/core": "^4.2.1",
"@probot/octokit-plugin-config": "^1.1.6",

@@ -38,3 +39,3 @@ "issue-metadata": "^0.1.6",

"devDependencies": {
"@octokit/types": "^9.3.1",
"@octokit/types": "^10.0.0",
"@total-typescript/ts-reset": "^0.4.0",

@@ -52,4 +53,4 @@ "@types/node": "18.16.18",

"typescript": "^5.0.0",
"vitest": "0.32.0"
"vitest": "0.32.2"
}
}

@@ -180,2 +180,3 @@ <!-- markdownlint-disable MD033 MD041 -->

pr-metadata: <pr-metadata.json>
config-path: <path to config file>
token: <GitHub token or PAT>

@@ -195,2 +196,9 @@

### config-path
Path to configuration file. Configuration file format is described in: [Policy section](#policy).
* default value: `.github/advanced-commit-linter.yml`
* requirements: `optional`
### token

@@ -197,0 +205,0 @@

@@ -0,4 +1,6 @@

import { debug, getInput } from '@actions/core';
import { context } from '@actions/github';
import { CustomOctokit } from './octokit';
import { configSchema, ConfigPolicy } from './schema/config';
import { context } from '@actions/github';

@@ -29,7 +31,10 @@ export class Config {

static async getConfig(octokit: CustomOctokit): Promise<Config> {
const retrievedConfig = await octokit.config.get({
...context.repo,
path: 'advanced-commit-linter.yml',
});
const path = getInput('config-path', { required: true });
const retrievedConfig = (
await octokit.config.get({ ...context.repo, path })
).config;
debug(`Configuration '${path}': ${JSON.stringify(retrievedConfig)}`);
if (Config.isConfigEmpty(retrievedConfig)) {

@@ -36,0 +41,0 @@ throw new Error(

@@ -172,4 +172,4 @@ import {

return {
...tracker,
id: prUniqueTracker[0].data?.id,
type: prUniqueTracker[0].data?.type ?? 'unknown',
url: prUniqueTracker[0].data?.url,

@@ -176,0 +176,0 @@ message: 'Tracker found',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc