lerna-changelog
lerna-changelog copied to clipboard
Support for repos hosted on gitlab
Not all projects are hosted on GitHub. A good second host might be gitlab.
+1 for this - would be great to have the creds and operations abstracted
Is there a clear road map to achieve this target ?
It's awesome ~ I'm looking forward to the implementation of this. When you want to do this, I'm happy to do some little efforts to help it. 😀
PRs welcome.
@evocateur hi, i found some different between github and gitlab
export function listCommits(from: string, to: string = ""): CommitListItem[] {
// Prints "<short-hash>;<ref-name>;<summary>;<date>"
// This format is used in `getCommitInfos` for easily analize the commit.
return execa
.sync("git", ["log", "--oneline", "--pretty=%h;%D;%s;%cd", "--date=short", `${from}..${to}`])
.stdout.split("\n")
.filter(Boolean)
.map((commit: string) => {
// commit:
// github : 5279caa;;Merge pull request #3 from xx-helloworld/dev;2019-04-22
// gitlab: 73ba6ec;;Merge branch 'dev' into 'master';2019-04-28
// i cant get number #3 at gitlab
const parts = commit.split(";");
const sha = parts[0];
const refName = parts[1];
const summary = parts[2];
const date = parts[3];
return { sha, refName, summary, date };
});
}
use gitlab api i cant get gitlab merge_request(pull) number. so help me 🙀 !
my pr repo and gitlab test demo
thank you and forgive my broken english
@xxholly32 I am not the active maintainer of lerna-changelog
, please open a new issue with a link back to this issue.
Would it not be possible to generate the changelog without remote access? I'd expect that it should be possible to go through the local commits to gather the necessary data.
Huge +1 for GitLab support
+1