Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: unjs/changelogen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.3
Choose a base ref
...
head repository: unjs/changelogen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.3.4
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Oct 16, 2022

  1. Copy the full SHA
    c0febf1 View commit details
  2. chore(release): v0.3.4

    pi0 committed Oct 16, 2022
    Copy the full SHA
    6fc5087 View commit details
Showing with 32 additions and 6 deletions.
  1. +0 −1 .changelogrc
  2. +13 −0 CHANGELOG.md
  3. +2 −1 package.json
  4. +6 −4 pnpm-lock.yaml
  5. +11 −0 src/config.ts
1 change: 0 additions & 1 deletion .changelogrc

This file was deleted.

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## v0.3.4

[compare changes](https://github.com/unjs/changelogen/compare/v0.3.3...v0.3.4)


### 🚀 Enhancements

- Infer github config from package.json ([#37](https://github.com/unjs/changelogen/pull/37))

### ❤️ Contributors

- Pooya Parsa

## v0.3.3

[compare changes](https://github.com/unjs/changelogen/compare/v0.3.2...v0.3.3)
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "changelogen",
"version": "0.3.3",
"version": "0.3.4",
"description": "Generate Beautiful Changelogs using Conventional Commits",
"repository": "unjs/changelogen",
"license": "MIT",
@@ -36,6 +36,7 @@
"convert-gitmoji": "^0.1.2",
"execa": "^6.1.0",
"mri": "^1.2.0",
"pkg-types": "^0.3.5",
"scule": "^0.3.2",
"semver": "^7.3.8"
},
10 changes: 6 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { resolve } from 'path'
import { loadConfig } from 'c12'
import { readPackageJSON } from 'pkg-types'
import { getLastGitTag, getCurrentGitRef } from './git'
import type { SemverBumpType } from './semver'

@@ -62,5 +63,15 @@ export async function loadChangelogConfig (cwd: string, overrides?: Partial<Chan
config.output = config.output === true ? ConfigDefaults.output : resolve(cwd, config.output)
}

if (!config.github) {
const pkg = await readPackageJSON(cwd).catch(() => {})
if (pkg && pkg.repository) {
const repo = typeof pkg.repository === 'string' ? pkg.repository : pkg.repository.url
if (/^[\w]+\/[\w]+$/.test(repo)) {
config.github = repo
}
}
}

return config
}