Skip to content

Commit

Permalink
fix: 🛠️ glob patterns input separator - from comma to semicolon (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
murtuzaalisurti authored Sep 25, 2024
2 parents 5f5d63a + 03c477d commit 870f815
Show file tree
Hide file tree
Showing 7 changed files with 1,097 additions and 911 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
ai-model-api-key: ${{ secrets.MODEL_API_KEY }} # make sure to set this in your repository secrets - /settings/secrets/actions (Settings > Secrets and Variables > Actions > Secrets Tab)
platform: 'openai'
delete-existing-review-by-bot: true #default is true
filesToIgnore: '**/*.env, .husky/**' # uses glob patterns (micromatch - https://github.com/micromatch/micromatch)
filesToIgnore: '**/*.env; .husky/**; .cache/**' # uses glob patterns (micromatch - https://github.com/micromatch/micromatch)
rules: |- # Rules to consider for code review
-- It must follow industry standard best practices
-- It should be idiomatic
Expand Down Expand Up @@ -144,13 +144,13 @@ The rules to consider for code review. It is a multiline text field. Each rule s

### 7. `filesToIgnore` (Optional)

List of files to ignore. It is a comma(`,`) separated list of glob patterns. The default list of ignored files is:
List of files to ignore. It is a semicolon(`;`) separated list of glob patterns. The default list of ignored files is:

```text
**/node_modules/**,
**/package-lock.json,
**/yarn.lock,
.cache/**,
**/node_modules/**
**/package-lock.json
**/yarn.lock
.cache/**
**/*.{jpg,jpeg,png,svg,webp,avif,gif,ico,woff,woff2,ttf,otf}
```

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inputs:
rules:
description: "The rules to consider for code review"
filesToIgnore:
description: "List of files to ignore"
description: "List of files to ignore - a semicolon(;) separated list of glob patterns"
runs:
using: "node20"
main: "dist/index.js"
148 changes: 148 additions & 0 deletions dist/33.index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
export const id = 33;
export const ids = [33];
export const modules = {

/***/ 7666:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */

if (!globalThis.DOMException) {
try {
const { MessageChannel } = __webpack_require__(8167),
port = new MessageChannel().port1,
ab = new ArrayBuffer()
port.postMessage(ab, [ab, ab])
} catch (err) {
err.constructor.name === 'DOMException' && (
globalThis.DOMException = err.constructor
)
}
}

module.exports = globalThis.DOMException


/***/ }),

/***/ 2033:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
fileFromPath: () => (/* binding */ fileFromPath)
});

// UNUSED EXPORTS: fileFromPathSync, isFile

// EXTERNAL MODULE: external "fs"
var external_fs_ = __webpack_require__(9896);
// EXTERNAL MODULE: external "path"
var external_path_ = __webpack_require__(6928);
// EXTERNAL MODULE: ./node_modules/node-domexception/index.js
var node_domexception = __webpack_require__(7666);
// EXTERNAL MODULE: ./node_modules/formdata-node/lib/esm/File.js
var File = __webpack_require__(2928);
;// CONCATENATED MODULE: ./node_modules/formdata-node/lib/esm/isPlainObject.js
const getType = (value) => (Object.prototype.toString.call(value).slice(8, -1).toLowerCase());
function isPlainObject(value) {
if (getType(value) !== "object") {
return false;
}
const pp = Object.getPrototypeOf(value);
if (pp === null || pp === undefined) {
return true;
}
const Ctor = pp.constructor && pp.constructor.toString();
return Ctor === Object.toString();
}
/* harmony default export */ const esm_isPlainObject = (isPlainObject);

// EXTERNAL MODULE: ./node_modules/formdata-node/lib/esm/isFile.js
var isFile = __webpack_require__(928);
;// CONCATENATED MODULE: ./node_modules/formdata-node/lib/esm/fileFromPath.js
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _FileFromPath_path, _FileFromPath_start;






const MESSAGE = "The requested file could not be read, "
+ "typically due to permission problems that have occurred after a reference "
+ "to a file was acquired.";
class FileFromPath {
constructor(input) {
_FileFromPath_path.set(this, void 0);
_FileFromPath_start.set(this, void 0);
__classPrivateFieldSet(this, _FileFromPath_path, input.path, "f");
__classPrivateFieldSet(this, _FileFromPath_start, input.start || 0, "f");
this.name = (0,external_path_.basename)(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
this.size = input.size;
this.lastModified = input.lastModified;
}
slice(start, end) {
return new FileFromPath({
path: __classPrivateFieldGet(this, _FileFromPath_path, "f"),
lastModified: this.lastModified,
size: end - start,
start
});
}
async *stream() {
const { mtimeMs } = await external_fs_.promises.stat(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
if (mtimeMs > this.lastModified) {
throw new node_domexception(MESSAGE, "NotReadableError");
}
if (this.size) {
yield* (0,external_fs_.createReadStream)(__classPrivateFieldGet(this, _FileFromPath_path, "f"), {
start: __classPrivateFieldGet(this, _FileFromPath_start, "f"),
end: __classPrivateFieldGet(this, _FileFromPath_start, "f") + this.size - 1
});
}
}
get [(_FileFromPath_path = new WeakMap(), _FileFromPath_start = new WeakMap(), Symbol.toStringTag)]() {
return "File";
}
}
function createFileFromPath(path, { mtimeMs, size }, filenameOrOptions, options = {}) {
let filename;
if (esm_isPlainObject(filenameOrOptions)) {
[options, filename] = [filenameOrOptions, undefined];
}
else {
filename = filenameOrOptions;
}
const file = new FileFromPath({ path, size, lastModified: mtimeMs });
if (!filename) {
filename = file.name;
}
return new File/* File */.Z([file], filename, {
...options, lastModified: file.lastModified
});
}
function fileFromPathSync(path, filenameOrOptions, options = {}) {
const stats = statSync(path);
return createFileFromPath(path, stats, filenameOrOptions, options);
}
async function fileFromPath(path, filenameOrOptions, options) {
const stats = await external_fs_.promises.stat(path);
return createFileFromPath(path, stats, filenameOrOptions, options);
}


/***/ })

};
Loading

0 comments on commit 870f815

Please sign in to comment.