From 14ccc9727e9c96fa10384f58d95e3fade57f815b Mon Sep 17 00:00:00 2001 From: Conventional Changelog Action Date: Sat, 16 Jan 2021 12:04:23 +0000 Subject: [PATCH] chore(release): v1.0.25 --- CHANGELOG.md | 23 ++++++++++------------- index.js | 8 ++++++++ package.json | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7985ca0..01dd9ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,17 @@ +## 1.0.25 (2021-01-16) + +* fix: should fix unshallow repo ([17c5d85](https://github.com/simonecorsi/mawesome/commit/17c5d85)) + + + ## 1.0.24 (2021-01-16) -* fix: git push ([c8fb3f4](https://github.com/simonecorsi/mawesome/commit/c8fb3f4)) - - - -## 1.0.23 (2021-01-16) - -* chore(release): v1.0.23 ([f41befa](https://github.com/simonecorsi/mawesome/commit/f41befa)) -* docs: added authors ([3de0e12](https://github.com/simonecorsi/mawesome/commit/3de0e12)) - - - -## 1.0.22 (2021-01-16) - * chore(release): v1.0.22 ([3f66738](https://github.com/simonecorsi/mawesome/commit/3f66738)) +* chore(release): v1.0.23 ([f41befa](https://github.com/simonecorsi/mawesome/commit/f41befa)) +* chore(release): v1.0.24 ([9badeaf](https://github.com/simonecorsi/mawesome/commit/9badeaf)) * fix: git pull strategy ([edb4a38](https://github.com/simonecorsi/mawesome/commit/edb4a38)) +* fix: git push ([c8fb3f4](https://github.com/simonecorsi/mawesome/commit/c8fb3f4)) +* docs: added authors ([3de0e12](https://github.com/simonecorsi/mawesome/commit/3de0e12)) diff --git a/index.js b/index.js index 0dfed61..da61522 100644 --- a/index.js +++ b/index.js @@ -21265,6 +21265,10 @@ const { GITHUB_REPOSITORY, GITHUB_REF } = process.env; const branch = GITHUB_REF === null || GITHUB_REF === void 0 ? void 0 : GITHUB_REF.replace('refs/heads/', ''); exports.default = new (class Git { constructor() { + this.isShallow = () => __awaiter(this, void 0, void 0, function* () { + const isShallow = yield this.exec('rev-parse --is-shallow-repository'); + return isShallow.trim().replace('\n', '') === 'true'; + }); this.exec = (command) => { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { let execOutput = ''; @@ -21290,6 +21294,10 @@ exports.default = new (class Git { this.commit = (message) => this.exec(`commit -m "${message}"`); this.pull = () => __awaiter(this, void 0, void 0, function* () { const args = ['pull']; + // Check if the repo is unshallow + if (yield this.isShallow()) { + args.push('--unshallow'); + } args.push('--tags'); args.push(core.getInput('git-pull-method')); return this.exec(args.join(' ')); diff --git a/package.json b/package.json index 20b8f07..741ff69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mawesome", - "version": "1.0.24", + "version": "1.0.25", "description": "Generate awesome list from user starred repositories", "main": "index.js", "author": "Simone Corsi",