Skip to content

Commit d75c2ff

Browse files
agoldisclaude
andcommitted
chore: release 2.0.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018KVkH9Ei4iCN2WvGMAUT1d
1 parent 5d29eb4 commit d75c2ff

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
## 2.0.0
4+
5+
Breaking: `commitInfo()` returns other values than 1.x.
6+
7+
- Fills the fields git could not read from the CI provider's variables: GitHub Actions, GitLab, CircleCI, Jenkins, Azure Pipelines, Bitbucket Pipelines, Buildkite, AWS CodeBuild, and the providers listed in `src/ci.js`. Priority: `COMMIT_INFO_*`, then git, then the CI provider. The variables are the ones the Currents Playwright reporter used.
8+
- `remote` comes from `COMMIT_INFO_REMOTE`, then the CI provider's variables, then git. The CI providers that set a remote are AWS CodeBuild, Azure Pipelines, Bamboo, Buildkite, CircleCI, Drone, GitLab, Semaphore and Netlify. This is the rule the Currents Playwright reporter used.
9+
- On Semaphore, `remote` is the clone URL in `SEMAPHORE_GIT_URL`. The Currents Playwright reporter reported `SEMAPHORE_GIT_REPO_SLUG` (`owner/repo`), which Currents could not build commit links from.
10+
- On Bamboo, `remote` comes from `bamboo_planRepository_repositoryUrl`. The Currents Playwright reporter read `bamboo_planRepository_repositoryURL`, which Bamboo does not set.
11+
- `remote` has no user name or password, also in the `DEBUG=commit-info` output and from `getRemoteOrigin()` and `getCiCommitInfo()`.
12+
- On CI, when git refuses a repository owned by another user ("dubious ownership"), the read-only git commands run again with `-c safe.directory=*`. CI means that `CI` is set or a CI provider is detected, so Jenkins counts. `GOOGLE_CLOUD_PROJECT`, `GCP_PROJECT`, `GCLOUD_PROJECT` and `JENKINS_HOME` alone do not count.
13+
- Prints one warning when git fails and fields stay empty, also when git is not in `PATH`.
14+
- New exports: `getCiCommitInfo`, `detectCiProvider`, `removeCredentials`, and TypeScript types.
15+
16+
Migration:
17+
18+
- If your code fills empty `commitInfo()` fields from CI provider variables, remove it: `commitInfo()` does that now.
19+
- If your code replaces the git remote with the CI provider's remote, remove it: `commitInfo()` returns `COMMIT_INFO_REMOTE`, else the CI provider's remote, else the git remote, without credentials.

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@currents/commit-info",
33
"description": "Collects Git commit info from CI or from CLI",
4-
"version": "1.1.0",
4+
"version": "2.0.0",
55
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
66
"contributors": [
77
"Gleb Bahmutov <gleb.bahmutov@gmail.com>",

0 commit comments

Comments
 (0)