Compare commits

...

69 Commits

Author SHA1 Message Date
Federico Grandi
d4d066316a 9.1.0 2022-08-22 17:37:29 +00:00
allcontributors[bot]
780b0df14e docs: add kachkaev as a contributor for bug (#425)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-08-22 19:33:35 +02:00
allcontributors[bot]
91b0f62409 docs: add melink14 as a contributor for bug (#424)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-08-22 19:32:45 +02:00
Federico Grandi
f7edecabb7 feat: add fetch input (#423)
* chore: add additional log notes

* feat: add `fetch` input

Ref #386

* fix: add warnings about not fetching

* docs: `fetch` input & large repos FAQ

* chore: fix typo
2022-08-22 19:26:22 +02:00
dependabot[bot]
68e252f6d5 chore(deps): bump @actions/core from 1.9.0 to 1.9.1 (#421)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-16 11:52:38 +02:00
dependabot[bot]
22a5148239 chore(deps-dev): bump ts-node from 10.8.2 to 10.9.1 (#418)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.2 to 10.9.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.8.2...v10.9.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-19 12:19:32 +02:00
dependabot[bot]
f1e4faf559 chore(deps-dev): bump ts-node from 10.8.1 to 10.8.2 (#417)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.1 to 10.8.2.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.8.1...v10.8.2)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04 15:21:02 +02:00
dependabot[bot]
a54a7342a8 chore(deps-dev): bump eslint-plugin-prettier from 4.0.0 to 4.2.1 (#416)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 4.0.0 to 4.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v4.0.0...v4.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04 15:20:39 +02:00
dependabot[bot]
6d81b3b072 ci(deps): bump github/codeql-action from 1 to 2 (#414)
* ci(deps): bump github/codeql-action from 1 to 2

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ci: update codeql workflow

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
2022-06-26 22:02:33 +02:00
Federico Grandi
5bf17ab674 chore: use dependabot on GitHub actions too 2022-06-26 19:28:22 +00:00
Federico Grandi
1308272399 ci: update workflows 2022-06-26 19:24:39 +00:00
Federico Grandi
998652d28d docs: update changelog 2022-06-26 19:15:56 +00:00
Federico Grandi
66ecef4789 9.0.1 2022-06-26 19:11:46 +00:00
Federico Grandi
cbc4f17c16 fix: correct typo in error 2022-06-26 19:09:57 +00:00
allcontributors[bot]
ff41bd83fc docs: add onedr0p as a contributor for bug (#413)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-06-26 21:04:41 +02:00
allcontributors[bot]
f01349f789 docs: add AvivPeledTalon as a contributor for bug (#412)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-06-26 21:03:18 +02:00
Federico Grandi
0d52df43e8 fix: re-stage files after pulling (#411)
* fix: re-stage files after pulling

This should fix an issue that prevented changes from being committed
when `git pull --rebase --autostash` used.

Issue #406

* chore: mark pre-commit hook as executable

* fix: detect conflicts after pull
2022-06-26 20:58:34 +02:00
dependabot[bot]
9fc8e267d9 chore(deps-dev): bump typescript from 4.7.3 to 4.7.4 (#409)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.3 to 4.7.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.3...v4.7.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-20 22:24:51 +02:00
dependabot[bot]
b7a37a1d30 chore(deps): bump @actions/core from 1.8.2 to 1.9.0 (#408)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-20 22:24:42 +02:00
dependabot[bot]
d93b31c94f chore(deps-dev): bump prettier from 2.6.2 to 2.7.1 (#407)
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.2 to 2.7.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.2...2.7.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-20 22:24:30 +02:00
Federico Grandi
d56de922da chore: bump simple-git 2022-06-14 12:57:12 +02:00
dependabot[bot]
d17f9e05d0 chore(deps-dev): bump typescript from 4.7.2 to 4.7.3 (#404)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.2 to 4.7.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.2...v4.7.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 18:28:39 +02:00
dependabot[bot]
43f9ed2319 chore(deps-dev): bump ts-node from 10.8.0 to 10.8.1 (#403)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.0 to 10.8.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.8.0...v10.8.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 18:26:28 +02:00
dependabot[bot]
ecfc673e49 chore(deps-dev): bump typescript from 4.6.4 to 4.7.2 (#400)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 4.7.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.4...v4.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 11:39:26 +02:00
allcontributors[bot]
c5ea534638 docs: add revolunet as a contributor for doc (#402)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-05-30 15:59:37 +02:00
Julien Bouquillon
19bc3334a6 docs(readme): fix code indent (#401) 2022-05-30 15:58:30 +02:00
dependabot[bot]
625465ddfa chore(deps-dev): bump @vercel/ncc from 0.33.4 to 0.34.0 (#399)
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.33.4 to 0.34.0.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.33.4...0.34.0)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 15:55:07 +02:00
dependabot[bot]
56ba54f5eb chore(deps-dev): bump ts-node from 10.7.0 to 10.8.0 (#398)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.7.0 to 10.8.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.7.0...v10.8.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-23 14:45:00 +02:00
dependabot[bot]
27b19f81e0 chore(deps): bump @actions/core from 1.8.0 to 1.8.2 (#397)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.0 to 1.8.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 19:11:38 +02:00
dependabot[bot]
d4433a238b chore(deps): bump @actions/core from 1.7.0 to 1.8.0 (#396)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 15:16:14 +02:00
dependabot[bot]
c6058fcbe2 chore(deps-dev): bump husky from 7.0.4 to 8.0.1 (#395)
Bumps [husky](https://github.com/typicode/husky) from 7.0.4 to 8.0.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v7.0.4...v8.0.1)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 15:15:19 +02:00
dependabot[bot]
f290181c01 chore(deps): bump @actions/core from 1.6.0 to 1.7.0 (#394)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 17:32:12 +02:00
dependabot[bot]
4d24efd108 chore(deps-dev): bump typescript from 4.6.3 to 4.6.4 (#393)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.3 to 4.6.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.3...v4.6.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 17:31:57 +02:00
dependabot[bot]
89896039c8 chore(deps): bump async from 3.2.0 to 3.2.3 (#391)
Bumps [async](https://github.com/caolan/async) from 3.2.0 to 3.2.3.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v3.2.0...v3.2.3)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 18:08:01 +02:00
dependabot[bot]
ed576dbe8c chore(deps-dev): bump @vercel/ncc from 0.33.3 to 0.33.4 (#390)
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.33.3 to 0.33.4.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.33.3...0.33.4)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 18:05:50 +02:00
dependabot[bot]
8b817249e9 chore(deps-dev): bump prettier from 2.6.1 to 2.6.2 (#387)
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.1...2.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-05 13:34:02 +02:00
dependabot[bot]
34260c9d7c chore(deps-dev): bump prettier from 2.6.0 to 2.6.1 (#384)
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.0...2.6.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 14:02:51 +02:00
dependabot[bot]
02f7344d49 chore(deps-dev): bump typescript from 4.6.2 to 4.6.3 (#383)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.2...v4.6.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 14:02:39 +02:00
dependabot[bot]
05ce3af6f3 chore(deps): bump minimist from 1.2.5 to 1.2.6 (#382)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 00:20:30 +01:00
dependabot[bot]
c6b867bd0b chore(deps-dev): bump prettier from 2.5.1 to 2.6.0 (#381)
Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.5.1...2.6.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 16:01:41 +01:00
Federico Grandi
4c184a79ea chore: bump simple-git (#380) 2022-03-18 11:22:57 +01:00
allcontributors[bot]
4250682bb5 docs: add Akimon658 as a contributor for doc (#379)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-03-12 11:38:07 +01:00
Akimo
8e591a749d docs: add missing single quote (#378) 2022-03-12 11:36:58 +01:00
Federico Grandi
050a667872 release: v9.0.0 2022-03-11 22:59:13 +01:00
allcontributors[bot]
7fbfbfa278 docs: add Josh-Cena as a contributor for bug (#377)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-03-11 22:47:09 +01:00
Federico Grandi
0b47528fc7 fix!: fail when there's an error while committing (#376) 2022-03-11 22:44:53 +01:00
allcontributors[bot]
a3279e7b72 docs: add sconix as a contributor for ideas (#375)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-03-11 19:14:39 +01:00
Federico Grandi
0930a0f6f6 docs(README): add tag_push and tag_pushed 2022-03-11 19:09:48 +01:00
Federico Grandi
0e4f5f6417 feat: add tag_push input and tag_pushed output (#374) 2022-03-11 19:01:06 +01:00
dependabot[bot]
d67ae5f689 chore(deps-dev): bump ts-node from 10.5.0 to 10.7.0 (#373)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.5.0 to 10.7.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.5.0...v10.7.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 15:03:51 +01:00
dependabot[bot]
2cbf8ebce9 chore(deps-dev): bump typescript from 4.5.5 to 4.6.2 (#372)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.5 to 4.6.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.5...v4.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 15:01:09 +01:00
dependabot[bot]
6d7bd0506d chore(deps-dev): bump eslint-config-prettier from 8.4.0 to 8.5.0 (#371)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.4.0 to 8.5.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.4.0...v8.5.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 15:00:48 +01:00
Federico Grandi
e6dcd77d10 docs(README): remove "used by" badge
The built-in GitHub dependents stats are more accurate
2022-03-02 00:02:41 +01:00
dependabot[bot]
43eaf991fc chore(deps-dev): bump eslint-config-prettier from 8.3.0 to 8.4.0 (#368)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.3.0 to 8.4.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.3.0...v8.4.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-21 15:57:59 +01:00
dependabot[bot]
61b52dba1f chore(deps-dev): bump ts-node from 10.4.0 to 10.5.0 (#364)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.4.0 to 10.5.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.4.0...v10.5.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 19:39:05 +01:00
dependabot[bot]
f53a7db16d chore(deps-dev): bump @vercel/ncc from 0.33.1 to 0.33.3 (#363)
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.33.1 to 0.33.3.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.33.1...0.33.3)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 19:38:37 +01:00
Federico Grandi
72e246094f release: v8.0.2 2022-02-07 14:42:37 +01:00
allcontributors[bot]
a9c53e5fc3 docs: add Namyalg as a contributor for doc (#361)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-02-07 14:40:02 +01:00
Federico Grandi
f9364915ea docs: list commit input in README
closes #360
2022-02-07 14:37:35 +01:00
dependabot[bot]
0d80c341c4 chore(deps-dev): bump typescript from 4.5.4 to 4.5.5 (#358)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.4 to 4.5.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.4...v4.5.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 20:24:43 +01:00
Federico Grandi
756d9ea820 release: v8.0.1 2022-01-23 23:49:26 +01:00
allcontributors[bot]
cb4f06fa66 docs: add prince-chrismc as a contributor for doc (#357)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-23 23:38:50 +01:00
Federico Grandi
3d8fcf9529 docs: add FAQ about PRs
closes #351
2022-01-23 23:35:47 +01:00
allcontributors[bot]
664b419dc5 docs: add secondmanveran as a contributor for doc (#356)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-23 23:23:14 +01:00
Federico Grandi
7b61ff5331 docs: fix outdated docs about the pull input
closes #354
2022-01-23 23:22:02 +01:00
Federico Grandi
017fbd6dce chore: lint source code 2022-01-23 23:13:35 +01:00
Federico Grandi
2103e93ecc chore: npm audit fix, update build 2022-01-23 23:09:07 +01:00
allcontributors[bot]
1a5e6d925d docs: add mcargille as a contributor for bug, code (#355)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-23 23:07:03 +01:00
mcargille
bfbc660a1b fix: add check to allow empty commits (#352)
* add check to allow empty commits if arg is set

* fix: target only the desired argument

* fix: add debug message

* fix: fix debug message

Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
2022-01-23 23:05:54 +01:00
16 changed files with 774 additions and 491 deletions

View File

@@ -314,6 +314,115 @@
"contributions": [
"bug"
]
},
{
"login": "mcargille",
"name": "mcargille",
"avatar_url": "https://avatars.githubusercontent.com/u/20142895?v=4",
"profile": "https://github.com/mcargille",
"contributions": [
"bug",
"code"
]
},
{
"login": "secondmanveran",
"name": "secondman",
"avatar_url": "https://avatars.githubusercontent.com/u/97000801?v=4",
"profile": "https://github.com/secondmanveran",
"contributions": [
"doc"
]
},
{
"login": "prince-chrismc",
"name": "Chris Mc",
"avatar_url": "https://avatars.githubusercontent.com/u/16867443?v=4",
"profile": "https://github.com/prince-chrismc",
"contributions": [
"doc"
]
},
{
"login": "Namyalg",
"name": "Namya LG",
"avatar_url": "https://avatars.githubusercontent.com/u/53875297?v=4",
"profile": "https://linkedin.com/in/namyalg",
"contributions": [
"doc"
]
},
{
"login": "sconix",
"name": "Janne Julkunen",
"avatar_url": "https://avatars.githubusercontent.com/u/921515?v=4",
"profile": "https://github.com/sconix",
"contributions": [
"ideas"
]
},
{
"login": "Josh-Cena",
"name": "Joshua Chen",
"avatar_url": "https://avatars.githubusercontent.com/u/55398995?v=4",
"profile": "https://joshcena.com",
"contributions": [
"bug"
]
},
{
"login": "Akimon658",
"name": "Akimo",
"avatar_url": "https://avatars.githubusercontent.com/u/81888693?v=4",
"profile": "http://akimon658.github.io",
"contributions": [
"doc"
]
},
{
"login": "revolunet",
"name": "Julien Bouquillon",
"avatar_url": "https://avatars.githubusercontent.com/u/124937?v=4",
"profile": "https://revolunet.com",
"contributions": [
"doc"
]
},
{
"login": "AvivPeledTalon",
"name": "Aviv Peled",
"avatar_url": "https://avatars.githubusercontent.com/u/92471076?v=4",
"profile": "https://github.com/AvivPeledTalon",
"contributions": [
"bug"
]
},
{
"login": "onedr0p",
"name": "Devin Buhl",
"avatar_url": "https://avatars.githubusercontent.com/u/213795?v=4",
"profile": "https://github.com/onedr0p",
"contributions": [
"bug"
]
},
{
"login": "melink14",
"name": "Erek Speed",
"avatar_url": "https://avatars.githubusercontent.com/u/1176550?v=4",
"profile": "https://erekspeed.com",
"contributions": [
"bug"
]
},
{
"login": "kachkaev",
"name": "Alexander Kachkaev",
"avatar_url": "https://avatars.githubusercontent.com/u/608862?v=4",
"profile": "https://kachkaev.uk",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7,

View File

@@ -14,3 +14,13 @@ updates:
include: 'scope'
labels:
- 'type: chore'
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
commit-message:
include: scope
prefix: ci
labels:
- 'type: chore'

View File

@@ -1,31 +0,0 @@
name: Build
on:
push:
branches:
- master
paths:
- src/**
- .github/workflows/build.yml
workflow_dispatch:
jobs:
build:
name: Build compiled JS version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm install
- run: npm run build
- uses: EndBug/add-and-commit@v4
with:
message: '[auto] build: update compiled version'
add: lib
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -29,42 +29,32 @@ jobs:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language
#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -2,7 +2,7 @@ name: Sync labels
on:
push:
branches:
- master
- main
paths:
- '.github/labels.yml'
workflow_dispatch:
@@ -12,8 +12,7 @@ jobs:
name: Run EndBug/label-sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: EndBug/label-sync@v1
- uses: actions/checkout@v3
- uses: EndBug/label-sync@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: '.github/labels.yml'

View File

@@ -6,17 +6,23 @@ on:
jobs:
build:
name: Test build
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: npm i
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
- run: npm ci
- run: npm run build
lint:
name: Check linting
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: npm i
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
- run: npm ci
- run: npm run lint

View File

@@ -1,4 +1,4 @@
name: Keep the versions up-to-date
name: Update tags
on:
release:
@@ -6,10 +6,8 @@ on:
jobs:
actions-tagger:
runs-on: windows-latest
runs-on: windows-2022
steps:
- uses: Actions-R-Us/actions-tagger@v1
- uses: Actions-R-Us/actions-tagger@v2
with:
publish_latest: true
env:
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
publish_latest_tag: true

0
.husky/pre-commit Normal file → Executable file
View File

View File

@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [9.1.0] - 2022-08-22
### Added:
- The `fetch` input allows you to customize the `git fetch` command, or to prevent the action from fetching at all.
## [9.0.1] - 2022-06-26
### Fixed:
- Now files are re-staged after pulling, so that the action works as intended when using options such as `pull: --rebase --autostash`
## [9.0.0] - 2022-03-11
### Changed:
- **[BREAKING]** The action will now fail when the `git commit` command fails. (#370)
- **[BREAKING]** The action won't try deleting and re-creting tags when it fails to push them, it's now up to you to set the proper arguments (see the `tag_push` input). (#367)
### Added:
- `tag_push` input: you can now set the arguments of the `git push --tags` command.
- `tag_pushed` output: whether the action pushed tags.
## [8.0.2] - 2022-02-07
### Fixed:
- The `commit` input is now properly listed in the README. (#360)
## [8.0.1] - 2022-01-23
### Fixed:
- Fixed a bug that prevented the `--allow-empty` flag from being used for the `commit` input. (#352)
- Fixed README and CHANGELOG docs for the `pull` input, that were still showing the option to use `NO-PULL` to prevent pulling (while now it's the default behavior). (#354)
- Added a paragraph to the FAQs section of the README, that explains how to work with PRs in v8. (#351)
## [8.0.0] - 2022-01-20
### Fixed:
@@ -18,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **[BREAKING]** The `signoff` input has been removed, use `commit` instead. (#331)
- **[BREAKING]** The `pull_strategy` input has been removed, use `pull` instead.
- **[BREAKING]** The `branch` and `branch_mode` inputs have been removed, check commit [`6fdb34e`](https://github.com/EndBug/add-and-commit/commit/6fdb34ed01d242c909eeb7e31bf1c4d37db43a54) for more info.
- **[BREAKING]** The `pull` input doesn't support `NO-PULL` anymore: if you don't want the action to pull, simply remove the input, as it's the default behavior now.
### Added:
@@ -290,7 +325,7 @@ First release
#
[unreleased]: https://github.com/EndBug/add-and-commit/compare/v8.0.0...HEAD
[unreleased]: https://github.com/EndBug/add-and-commit/compare/v9.1.0...HEAD
[1.0.0]: https://github.com/EndBug/add-and-commit/tree/v1.0.0
[2.0.0]: https://github.com/EndBug/add-and-commit/compare/v1.0.0...v2.0.0
[2.1.0]: https://github.com/EndBug/add-and-commit/compare/v2.0.0...v2.1.0
@@ -329,3 +364,8 @@ First release
[7.4.0]: https://github.com/EndBug/add-and-commit/compare/v7.3.0...v7.4.0
[7.5.0]: https://github.com/EndBug/add-and-commit/compare/v7.4.0...v7.5.0
[8.0.0]: https://github.com/EndBug/add-and-commit/compare/v7.5.0...v8.0.0
[8.0.1]: https://github.com/EndBug/add-and-commit/compare/v8.0.0...v8.0.1
[8.0.2]: https://github.com/EndBug/add-and-commit/compare/v8.0.1...v8.0.2
[9.0.0]: https://github.com/EndBug/add-and-commit/compare/v8.0.2...v9.0.0
[9.0.1]: https://github.com/EndBug/add-and-commit/compare/v9.0.0...v9.0.1
[9.1.0]: https://github.com/EndBug/add-and-commit/compare/v9.0.1...v9.1.0

View File

@@ -1,6 +1,5 @@
# Add & Commit
[![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fapi-endbug.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3DEndBug%2Fadd-and-commit%26badge%3Dtrue)](https://github.com/search?o=desc&q=EndBug+add-and-commit+path%3A.github%2Fworkflows+language%3AYAML&s=&type=Code)
[![All Contributors](https://img.shields.io/github/all-contributors/EndBug/add-and-commit)](#contributors-)
You can use this GitHub Action to commit changes made in your workflow run directly to your repo: for example, you use it to lint your code, update documentation, commit updated builds, etc...
@@ -18,7 +17,7 @@ You can use this GitHub Action to commit changes made in your workflow run direc
Add a step like this to your workflow:
```yaml
- uses: EndBug/add-and-commit@v8 # You can change this to use a specific version.
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
# The arguments for the `git add` command (see the paragraph below for more info)
# Default: '.'
@@ -32,6 +31,10 @@ Add a step like this to your workflow:
# Default: depends on the default_author input
author_email: mail@example.com
# Additional arguments for the git commit command. The --message argument is already set by the message input.
# Default: ''
commit: --signoff
# The name of the custom committer you want to use, if different from the author of the commit.
# Default: the name of the author (set with either author_name or default_author)
committer_name: Committer Name
@@ -51,6 +54,11 @@ Add a step like this to your workflow:
# Default: github_actor
default_author: github_actor
# Arguments for the git fetch command. If set to false, the action won't fetch the repo.
# For more info as to why fetching is usually recommended, please see the "Performance on large repos" FAQ.
# Default: --tags --force
fetch: false
# The message for the commit.
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'Your commit message'
@@ -66,9 +74,9 @@ Add a step like this to your workflow:
# Default: ignore
pathspec_error_handling: ignore
# Arguments for the git pull command. Use NO-PULL to avoid the action pulling at all.
# Default: '--no-rebase'
pull: 'NO-PULL or --rebase --autostash ...'
# Arguments for the git pull command. By default, the action does not pull.
# Default: ''
pull: '--rebase --autostash ...'
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
# Default: true
@@ -81,6 +89,10 @@ Add a step like this to your workflow:
# Arguments for the git tag command (the tag name always needs to be the first word not preceded by an hyphen)
# Default: ''
tag: 'v1.0.0 --force'
# Arguments for the git push --tags command (any additional argument will be added after --tags)
# Default: ''
tag_push: '--force'
```
### Git arguments
@@ -127,7 +139,9 @@ If you want to commit files "across different branches", here are two ways to do
### Tagging
You can use the `tag` option to enter the arguments for a `git add` command. In order for the action to isolate the tag name from the rest of the arguments, it should be the first word not preceded by an hyphen (e.g. `-a tag-name -m "some other stuff"` is ok).
You can use the `tag` option to enter the arguments for a `git add` command. In order for the action to isolate the tag name from the rest of the arguments, it should be the first word not preceded by an hyphen (e.g. `-a tag-name -m "some other stuff"` is ok).
You can also change the arguments of the push command for tags: every argument in the `tag_push` input will be appended to the `git push --tags` command.
For more info on how git arguments are parsed, see [the "Git arguments" section](#git-arguments).
## Outputs
@@ -138,11 +152,34 @@ The action provides these outputs:
- `commit_sha`: the short 7-character SHA of the commit that has just been created
- `pushed`: whether the action has pushed to the remote (`'true'` or `'false'`)
- `tagged`: whether the action has created a tag (`'true'` or `'false'`)
- `tag_pushed`: whether the action has pushed a tag (`'true'` or `'false'`)
For more info on how to use outputs, see ["Context and expression syntax"](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions).
## FAQs
### Working with PRs
By default, when you use `actions/checkout` on a PR, it will checkout the head commit in a detached head state.
If you want to make some changes, you have to checkout the branch the PR is coming from in the head repo.
You can set it up like this:
```yaml
- uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
```
You can find the full docs for payloads of `pull_request` events [here](https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#webhook-payload-example-32).
If you're planning on running this only on "internal" PRs (where head and base are in the same repo) then you can omit the `repository` input.
If you're planning to use this with PRs coming from other forks, please keep in mind that you might not have write access to those repos.
You can try setting up the repo with your PAT, as explained in the ["About tokens" paragraph](#about-tokens) of this section.
Keep in mind that this "custom checkout" is meant only for PRs: if your workflow runs on multiple events (like `push` or `workflow_dispatch`), you could try having this step run only for `pull_request` events, while other ones will trigger the usual checkout.
If you wish to do so, you can use the `step.if` property, [here](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif)'s the docs.
### About tokens
When pushing, the action uses the token that the local git repository has been configured with: that means that if you want to change it you'll need to do it in the steps that run before this action. For example: if you set up your repo with [`actions/checkout`](https://github.com/actions/checkout/) then you have to add the token there.
@@ -168,6 +205,14 @@ Some users reported that they were getting an error:
If you're getting this error and you're using `actions/checkout@v1`, try upgrading to `actions/checkout@v2`. If you're still having problems after upgrading, feel free to open an issue. Issue ref: [#146](https://github.com/EndBug/add-and-commit/issues/146)
### Performance on large repos
By default, the action will fetch the repository before starting to work on it: this ensures that it can see the already existing refs.
When working with a repository that has a lot of branches and tags, fetching it can take a long time. If the fetch step is taking too much time, you can decide to skip it by setting the `fetch` input to `false`: this will prevent the action from running `git fetch` altogether.
Please note that you have to set up your workflow accordingly: not fetching the repo can impact branch and tag creation within the action, and for this reason it's recommended to disable it only if necessary. Issue ref: [#386](https://github.com/EndBug/add-and-commit/issues/386)
## Examples
### Different author/committer configurations
@@ -182,7 +227,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: EndBug/add-and-commit@v8
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
```
@@ -192,7 +237,7 @@ You can also use the `committer_name` and `committer_email` inputs to make it ap
<img src="https://user-images.githubusercontent.com/26386270/130594168-1d910710-e2d0-4b06-9324-cbe5dde59154.png" height=70/>
```yaml
- uses: EndBug/add-and-commit@v8
- uses: EndBug/add-and-commit@v9
with:
message: Show GitHub Actions logo
committer_name: GitHub Actions
@@ -202,7 +247,7 @@ You can also use the `committer_name` and `committer_email` inputs to make it ap
<img src="https://user-images.githubusercontent.com/26386270/130594443-b881fae7-3064-4020-a4cc-6db37ef0df65.png" height=70/>
```yaml
- uses: EndBug/add-and-commit@v8
- uses: EndBug/add-and-commit@v9
with:
message: Show GitHub logo
committer_name: GitHub Actions
@@ -237,7 +282,7 @@ jobs:
run: eslint "src/**" --fix
- name: Commit changes
uses: EndBug/add-and-commit@v8
uses: EndBug/add-and-commit@v9
with:
author_name: Your Name
author_email: mail@example.com
@@ -268,7 +313,7 @@ jobs:
- run: echo "123" > ./pathToRepo/file.txt
# ...and then use the action as you would normally do, but providing the path to the repo
- uses: EndBug/add-and-commit@v8
- uses: EndBug/add-and-commit@v9
with:
message: 'Add the very useful text file'
add: '*.txt --force'
@@ -325,6 +370,22 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="http://blog.madewithdrew.com/"><img src="https://avatars.githubusercontent.com/u/239123?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Drew Wells</b></sub></a><br /><a href="#ideas-drewwells" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://kotlin.desarrollador-android.com/"><img src="https://avatars.githubusercontent.com/u/7463564?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Javier Segovia Córdoba</b></sub></a><br /><a href="#ideas-JavierSegoviaCordoba" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/Darylgolden"><img src="https://avatars.githubusercontent.com/u/9102529?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Darylgolden</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3ADarylgolden" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/mcargille"><img src="https://avatars.githubusercontent.com/u/20142895?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mcargille</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Amcargille" title="Bug reports">🐛</a> <a href="https://github.com/EndBug/add-and-commit/commits?author=mcargille" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/secondmanveran"><img src="https://avatars.githubusercontent.com/u/97000801?v=4?s=100" width="100px;" alt=""/><br /><sub><b>secondman</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=secondmanveran" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/prince-chrismc"><img src="https://avatars.githubusercontent.com/u/16867443?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chris Mc</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=prince-chrismc" title="Documentation">📖</a></td>
<td align="center"><a href="https://linkedin.com/in/namyalg"><img src="https://avatars.githubusercontent.com/u/53875297?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Namya LG</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=Namyalg" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/sconix"><img src="https://avatars.githubusercontent.com/u/921515?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Janne Julkunen</b></sub></a><br /><a href="#ideas-sconix" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://joshcena.com"><img src="https://avatars.githubusercontent.com/u/55398995?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joshua Chen</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3AJosh-Cena" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://akimon658.github.io"><img src="https://avatars.githubusercontent.com/u/81888693?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Akimo</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=Akimon658" title="Documentation">📖</a></td>
<td align="center"><a href="https://revolunet.com"><img src="https://avatars.githubusercontent.com/u/124937?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Julien Bouquillon</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/commits?author=revolunet" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/AvivPeledTalon"><img src="https://avatars.githubusercontent.com/u/92471076?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aviv Peled</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3AAvivPeledTalon" title="Bug reports">🐛</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/onedr0p"><img src="https://avatars.githubusercontent.com/u/213795?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Devin Buhl</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Aonedr0p" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://erekspeed.com"><img src="https://avatars.githubusercontent.com/u/1176550?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Erek Speed</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Amelink14" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://kachkaev.uk"><img src="https://avatars.githubusercontent.com/u/608862?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alexander Kachkaev</b></sub></a><br /><a href="https://github.com/EndBug/add-and-commit/issues?q=author%3Akachkaev" title="Bug reports">🐛</a></td>
</tr>
</table>

View File

@@ -29,6 +29,10 @@ inputs:
description: How the action should fill missing author name or email.
required: false
default: 'github_actor'
fetch:
description: Arguments for the git fetch command (if 'false', the action won't fetch the repo)
required: false
default: --tags --force
message:
description: The message for the commit
required: false
@@ -52,6 +56,9 @@ inputs:
tag:
description: Arguments for the git tag command (the tag name always needs to be the first word not preceded by a hyphen)
required: false
tag_push:
description: Arguments for the git push --tags command (any additional argument will be added after --tags)
required: false
# Input not required from the user
github_token:
@@ -70,6 +77,8 @@ outputs:
description: Whether the action has pushed to the remote.
tagged:
description: Whether the action has created a tag.
tag_pushed:
description: Whether the action has pushed a tag.
runs:
using: node12

4
lib/index.js generated

File diff suppressed because one or more lines are too long

735
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "add-and-commit",
"version": "8.0.0",
"version": "9.1.0",
"private": true,
"description": "Add & commit files from a path directly from GitHub Actions",
"main": "lib/index.js",
@@ -31,10 +31,10 @@
},
"homepage": "https://github.com/EndBug/add-and-commit#readme",
"dependencies": {
"@actions/core": "^1.6.0",
"@actions/core": "^1.9.1",
"actions-toolkit": "github:EndBug/actions-toolkit#core-actions",
"js-yaml": "^4.1.0",
"simple-git": "^2.27.0",
"simple-git": "^3.7.1",
"string-argv": "^0.3.1"
},
"devDependencies": {
@@ -42,15 +42,15 @@
"@types/node": "^12.12.54",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@vercel/ncc": "^0.33.1",
"@vercel/ncc": "^0.34.0",
"all-contributors-cli": "^6.20.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"prettier": "^2.5.1",
"ts-node": "^10.4.0",
"typescript": "^4.5.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"prettier": "^2.7.1",
"ts-node": "^10.9.1",
"typescript": "^4.7.4",
"yamljs": "^0.3.0"
}
}

View File

@@ -10,6 +10,7 @@ interface InputTypes {
committer_email: string
cwd: string
default_author: 'github_actor' | 'user_info' | 'github_actions'
fetch: string
message: string
new_branch: string | undefined
pathspec_error_handling: 'ignore' | 'exitImmediately' | 'exitAtEnd'
@@ -17,6 +18,7 @@ interface InputTypes {
push: string
remove: string | undefined
tag: string | undefined
tag_push: string | undefined
github_token: string | undefined
}
@@ -28,6 +30,7 @@ interface OutputTypes {
commit_sha: string | undefined
pushed: 'true' | 'false'
tagged: 'true' | 'false'
tag_pushed: 'true' | 'false'
}
export type output = keyof OutputTypes
@@ -36,7 +39,8 @@ export const outputs: OutputTypes = {
commit_long_sha: undefined,
commit_sha: undefined,
pushed: 'false',
tagged: 'false'
tagged: 'false',
tag_pushed: 'false'
}
// Setup default output values
Object.entries(outputs).forEach(([name, value]) => core.setOutput(name, value))
@@ -121,6 +125,20 @@ export async function checkInputs() {
)
// #endregion
// #region fetch
if (getInput('fetch')) {
let value: string | boolean
try {
value = getInput('fetch', true)
} catch {
value = getInput('fetch')
}
core.debug(`Currrent fetch option: '${value}' (parsed as ${typeof value})`)
}
// #endregion
// #region author_name, author_email
let name, email
switch (getInput('default_author')) {

View File

@@ -16,22 +16,32 @@ core.info(`Running in ${baseDir}`)
core.startGroup('Internal logs')
core.info('> Staging files...')
const peh = getInput('pathspec_error_handling')
const ignoreErrors =
getInput('pathspec_error_handling') == 'ignore' ? 'pathspec' : 'none'
if (getInput('add')) {
core.info('> Adding files...')
await add(peh == 'ignore' ? 'pathspec' : 'none')
await add(ignoreErrors)
} else core.info('> No files to add.')
if (getInput('remove')) {
core.info('> Removing files...')
await remove(peh == 'ignore' ? 'pathspec' : 'none')
await remove(ignoreErrors)
} else core.info('> No files to remove.')
core.info('> Checking for uncommitted changes in the git working tree...')
const changedFiles = (await git.diffSummary(['--cached'])).files.length
if (changedFiles > 0) {
// continue if there are any changes or if the allow-empty commit argument is included
if (
changedFiles > 0 ||
matchGitArgs(getInput('commit') || '').includes('--allow-empty')
) {
core.info(`> Found ${changedFiles} changed files.`)
core.debug(
`--allow-empty argument detected: ${matchGitArgs(
getInput('commit') || ''
).includes('--allow-empty')}`
)
await git
.addConfig('user.email', getInput('author_email'), undefined, log)
@@ -45,10 +55,29 @@ core.info(`Running in ${baseDir}`)
JSON.stringify((await git.listConfig()).all, null, 2)
)
await git.fetch(['--tags', '--force'], log)
let fetchOption: string | boolean
try {
fetchOption = getInput('fetch', true)
} catch {
fetchOption = getInput('fetch')
}
if (fetchOption) {
core.info('> Fetching repo...')
await git.fetch(
matchGitArgs(fetchOption === true ? '' : fetchOption),
log
)
} else core.info('> Not fetching repo.')
const targetBranch = getInput('new_branch')
if (targetBranch) {
core.info('> Checking-out branch...')
if (!fetchOption)
core.warning(
'Creating a new branch without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
)
await git
.checkout(targetBranch)
.then(() => {
@@ -67,26 +96,45 @@ core.info(`Running in ${baseDir}`)
await git
.fetch(undefined, log)
.pull(undefined, undefined, matchGitArgs(pullOption), log)
core.info('> Checking for conflicts...')
const status = await git.status(undefined, log)
if (!status.conflicted.length) {
core.info('> No conflicts found.')
core.info('> Re-staging files...')
if (getInput('add')) await add(ignoreErrors)
if (getInput('remove')) await remove(ignoreErrors)
} else
throw new Error(
`There are ${
status.conflicted.length
} conflicting files: ${status.conflicted.join(', ')}`
)
} else core.info('> Not pulling from repo.')
core.info('> Creating commit...')
const commitData = await git
await git
.commit(getInput('message'), matchGitArgs(getInput('commit') || ''))
.catch((err) => {
log(err)
.then(async (data) => {
log(undefined, data)
setOutput('committed', 'true')
setOutput('commit_sha', data.commit)
await git
.revparse(data.commit)
.then((long_sha) => setOutput('commit_long_sha', long_sha))
.catch((err) => core.warning(`Couldn't parse long SHA:\n${err}`))
})
if (commitData) {
log(undefined, commitData)
setOutput('committed', 'true')
setOutput('commit_sha', commitData.commit)
await git
.revparse(commitData.commit)
.then((long_sha) => setOutput('commit_long_sha', long_sha))
.catch((err) => core.warning(`Couldn't parse long SHA:\n${err}`))
}
.catch((err) => core.setFailed(err))
if (getInput('tag')) {
core.info('> Tagging commit...')
if (!fetchOption)
core.warning(
'Creating a tag without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
)
await git
.tag(matchGitArgs(getInput('tag') || ''), (err, data?) => {
if (data) setOutput('tagged', 'true')
@@ -139,27 +187,14 @@ core.info(`Running in ${baseDir}`)
if (getInput('tag')) {
core.info('> Pushing tags to repo...')
await git
.pushTags('origin', undefined, (e, d?) => log(undefined, e || d))
.catch(() => {
core.info(
'> Tag push failed: deleting remote tag and re-pushing...'
)
return git
.push(
undefined,
undefined,
{
'--delete': null,
origin: null,
[matchGitArgs(getInput('tag') || '').filter(
(w) => !w.startsWith('-')
)[0]]: null
},
log
)
.pushTags('origin', undefined, log)
.pushTags('origin', matchGitArgs(getInput('tag_push') || ''))
.then((data) => {
setOutput('tag_pushed', 'true')
return log(null, data)
})
.catch((err) => core.setFailed(err))
} else core.info('> No tags to push.')
} else core.info('> Not pushing anything.')
@@ -185,14 +220,12 @@ core.info(`Running in ${baseDir}`)
core.setFailed(e)
})
async function add(
ignoreErrors: 'all' | 'pathspec' | 'none' = 'none'
): Promise<(void | Response<void>)[]> {
async function add(ignoreErrors: 'all' | 'pathspec' | 'none' = 'none') {
const input = getInput('add')
if (!input) return []
const parsed = parseInputArray(input)
const res: (void | Response<void>)[] = []
const res: (string | void)[] = []
for (const args of parsed) {
res.push(