- introduce proper approach to retrieve tag before a given tag

- add configuration options for
  - path
  - configuration
  - fromTag, toTag
  - token
- allow to specify transformers to adjust information to a specific form
- allow to specify different templates
- speed up by limiting information to pull
- add logic to automatically resolve current
- use github actions logger
This commit is contained in:
Mike Penz
2020-10-16 15:52:24 +02:00
parent 5ec7a2d86f
commit 0a66008df0
18 changed files with 14515 additions and 158 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
import { Octokit, RestEndpointMethodTypes } from "@octokit/rest"
import moment from 'moment';
import { Logger } from "./logger"
import * as core from '@actions/core';
export interface CommitInfo {
sha: string
@@ -13,7 +12,7 @@ export interface CommitInfo {
}
export class Commits {
constructor(private octokit: Octokit) {}
constructor(private octokit: Octokit) { }
async getDiff(owner: string, repo: string, base: string, head: string): Promise<CommitInfo[]> {
const commits: CommitInfo[] = await this.getDiffRemote(owner, repo, base, head)
@@ -34,7 +33,7 @@ export class Commits {
compareHead = `${commits[0].sha}^`
}
Logger.log(`Found ${commits.length} commits from the GitHub API for ${owner}/${repo}`)
core.info(`Found ${commits.length} commits from the GitHub API for ${owner}/${repo}`)
return commits.map(commit => ({
sha: commit.sha,
summary: commit.commit.message.split("\n")[0],