mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-01 14:38:47 +00:00
breaking: Remove the exclude input
This commit is contained in:
8 files changed
+3
-21
No files matched your search
@@ -62,4 +62,3 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
exclude: 'chore,ci,build'
|
||||
@@ -49,10 +49,6 @@ Github token.
|
||||
|
||||
_Default:_ `${{ github.token }}`
|
||||
|
||||
#### `exclude` **(Optional, Deprecated)**
|
||||
|
||||
Exclude selected commit types (comma separated).
|
||||
|
||||
### Outputs
|
||||
|
||||
#### `changelog`
|
||||
|
||||
@@ -15,12 +15,6 @@ inputs:
|
||||
required: true
|
||||
default: ${{ github.token }}
|
||||
|
||||
exclude:
|
||||
description: 'Exclude selected commit types (comma separated)'
|
||||
deprecationMessage: 'This input will be removed in the next major release'
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
outputs:
|
||||
|
||||
changelog:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7412:function(e,p,a){"use strict";var d=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a((function(p){p(e)}))}return new(a||(a=Promise))((function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())}))};var t=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var p=e[Symbol.asyncIterator],a;return p?p.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(p){a[p]=e[p]&&function(a){return new Promise((function(d,t){a=e[p](a),settle(d,t,a.done,a.value)}))}}function settle(e,p,a,d){Promise.resolve(d).then((function(p){e({value:p,done:a})}),p)}};var r=this&&this.__rest||function(e,p){var a={};for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)&&p.indexOf(d)<0)a[d]=e[d];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var t=0,d=Object.getOwnPropertySymbols(e);t<d.length;t++){if(p.indexOf(d[t])<0&&Object.prototype.propertyIsEnumerable.call(e,d[t]))a[d[t]]=e[d[t]]}return a};Object.defineProperty(p,"__esModule",{value:true});p.generate=void 0;const i=a(1912);function generate(e){var p,a;var s,o,m;return d(this,void 0,void 0,(function*(){const{octokit:d,exclude:l,owner:n,repo:u,sha:c,tagRef:v}=e;const h=`https://github.com/${n}/${u}`;const w={};try{e:for(var g=t(d.paginate.iterator(d.rest.repos.listCommits,{per_page:100,owner:n,repo:u,sha:c})),T;T=yield g.next(),!T.done;){const{data:e}=T.value;for(let p of e){const{sha:e}=p,a=r(p,["sha"]);if(e===v)break e;const d=a.commit.message.split("\n")[0];let[,t,l,n,u]=i.COMMIT_REGEX.exec(d)||[];if(!n)continue;u=trim(u);if(u==="ignore")continue;t=trim(t);t=(s=i.TYPES[t])!==null&&s!==void 0?s:i.TYPES.other;l=l?trim(l):"";n=trim(n).replace(i.PR_REGEX,((e,p)=>`[${e}](${h}/pull/${p})`));w[t]=(o=w[t])!==null&&o!==void 0?o:{};w[t][l]=(m=w[t][l])!==null&&m!==void 0?m:[];const c=w[t][l].findIndex((e=>e.title===n));if(c===-1)w[t][l].push({title:n,commits:[e]});else w[t][l][c].commits.push(e)}}}catch(e){p={error:e}}finally{try{if(T&&!T.done&&(a=g.return))yield a.call(g)}finally{if(p)throw p.error}}return Object.values(i.TYPES).filter((e=>!l.includes(e))).reduce(((e,p)=>{const a=w[p];if(a==null)return e;e.push(`### ${p}`,"");const d=Object.keys(a).sort();for(const p of d){const d=a[p];const t=p.length===0;if(!t)e.push(`* **${p}:**`);const r=t?"":" ";for(const{title:p,commits:a}of d){e.push(`${r}* ${p} (${a.map((e=>`[${e.slice(0,8)}](${h}/commit/${e})`)).join(",")})`)}}e.push("");return e}),[]).join("\n")}))}p.generate=generate;function trim(e){if(e==null)return e;return e.trim().replace(/ {2,}/g," ")}},1912:(e,p)=>{"use strict";Object.defineProperty(p,"__esModule",{value:true});p.TYPES=p.PR_REGEX=p.COMMIT_REGEX=void 0;p.COMMIT_REGEX=/^([^)]*)(?:\(([^)]*?)\)|):(.*?)(?:\[([^\]]+?)\]|)\s*$/;p.PR_REGEX=/#([1-9]\d*)/g;p.TYPES={breaking:"Breaking Changes",feat:"New Features",fix:"Bug Fixes",revert:"Reverts",perf:"Performance Improvements",refactor:"Refactors",deps:"Dependencies",docs:"Documentation Changes",style:"Code Style Changes",build:"Build System",ci:"Continuous Integration",test:"Tests",chore:"Chores",other:"Other Changes"}},9283:function(e,p,a){"use strict";var d=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a((function(p){p(e)}))}return new(a||(a=Promise))((function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())}))};Object.defineProperty(p,"__esModule",{value:true});const t=a(2186);const r=a(5438);const i=a(7412);const s=a(1912);function run(){return d(this,void 0,void 0,(function*(){const e=(0,t.getInput)("token",{required:true});const p=(0,t.getInput)("exclude",{required:false}).split(",").map((e=>{var p;return(p=s.TYPES[e])!==null&&p!==void 0?p:e}));const a=(0,r.getOctokit)(e);const{repo:{owner:d,repo:o},sha:m}=r.context;const{data:l}=yield a.rest.repos.listTags({owner:d,repo:o,per_page:2});let n;if(l.length>0){if(m===l[0].commit.sha){if(l.length>1)n=l[1].commit.sha}else n=l[0].commit.sha}const u=yield(0,i.generate)({octokit:a,exclude:p,owner:d,repo:o,sha:m,tagRef:n});(0,t.info)(u);(0,t.setOutput)("changelog",u)}))}run().catch((e=>(0,t.setFailed)(e.message)))},7351:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?functLine truncated
|
||||
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7412:function(e,p,a){"use strict";var d=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a((function(p){p(e)}))}return new(a||(a=Promise))((function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())}))};var t=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var p=e[Symbol.asyncIterator],a;return p?p.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(p){a[p]=e[p]&&function(a){return new Promise((function(d,t){a=e[p](a),settle(d,t,a.done,a.value)}))}}function settle(e,p,a,d){Promise.resolve(d).then((function(p){e({value:p,done:a})}),p)}};var r=this&&this.__rest||function(e,p){var a={};for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)&&p.indexOf(d)<0)a[d]=e[d];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var t=0,d=Object.getOwnPropertySymbols(e);t<d.length;t++){if(p.indexOf(d[t])<0&&Object.prototype.propertyIsEnumerable.call(e,d[t]))a[d[t]]=e[d[t]]}return a};Object.defineProperty(p,"__esModule",{value:true});p.generate=void 0;const i=a(1912);function generate(e){var p,a;var s,o,m;return d(this,void 0,void 0,(function*(){const{octokit:d,owner:l,repo:n,sha:u,tagRef:c}=e;const v=`https://github.com/${l}/${n}`;const h={};try{e:for(var w=t(d.paginate.iterator(d.rest.repos.listCommits,{per_page:100,owner:l,repo:n,sha:u})),g;g=yield w.next(),!g.done;){const{data:e}=g.value;for(let p of e){const{sha:e}=p,a=r(p,["sha"]);if(e===c)break e;const d=a.commit.message.split("\n")[0];let[,t,l,n,u]=i.COMMIT_REGEX.exec(d)||[];if(!n)continue;u=trim(u);if(u==="ignore")continue;t=trim(t);t=(s=i.TYPES[t])!==null&&s!==void 0?s:i.TYPES.other;l=l?trim(l):"";n=trim(n).replace(i.PR_REGEX,((e,p)=>`[${e}](${v}/pull/${p})`));h[t]=(o=h[t])!==null&&o!==void 0?o:{};h[t][l]=(m=h[t][l])!==null&&m!==void 0?m:[];const w=h[t][l].findIndex((e=>e.title===n));if(w===-1)h[t][l].push({title:n,commits:[e]});else h[t][l][w].commits.push(e)}}}catch(e){p={error:e}}finally{try{if(g&&!g.done&&(a=w.return))yield a.call(w)}finally{if(p)throw p.error}}return Object.values(i.TYPES).reduce(((e,p)=>{const a=h[p];if(a==null)return e;e.push(`### ${p}`,"");const d=Object.keys(a).sort();for(const p of d){const d=a[p];const t=p.length===0;if(!t)e.push(`* **${p}:**`);const r=t?"":" ";for(const{title:p,commits:a}of d){e.push(`${r}* ${p} (${a.map((e=>`[${e.slice(0,8)}](${v}/commit/${e})`)).join(",")})`)}}e.push("");return e}),[]).join("\n")}))}p.generate=generate;function trim(e){if(e==null)return e;return e.trim().replace(/ {2,}/g," ")}},1912:(e,p)=>{"use strict";Object.defineProperty(p,"__esModule",{value:true});p.TYPES=p.PR_REGEX=p.COMMIT_REGEX=void 0;p.COMMIT_REGEX=/^([^)]*)(?:\(([^)]*?)\)|):(.*?)(?:\[([^\]]+?)\]|)\s*$/;p.PR_REGEX=/#([1-9]\d*)/g;p.TYPES={breaking:"Breaking Changes",feat:"New Features",fix:"Bug Fixes",revert:"Reverts",perf:"Performance Improvements",refactor:"Refactors",deps:"Dependencies",docs:"Documentation Changes",style:"Code Style Changes",build:"Build System",ci:"Continuous Integration",test:"Tests",chore:"Chores",other:"Other Changes"}},9283:function(e,p,a){"use strict";var d=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a((function(p){p(e)}))}return new(a||(a=Promise))((function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())}))};Object.defineProperty(p,"__esModule",{value:true});const t=a(2186);const r=a(5438);const i=a(7412);function run(){return d(this,void 0,void 0,(function*(){const e=(0,t.getInput)("token",{required:true});const p=(0,r.getOctokit)(e);const{repo:{owner:a,repo:d},sha:s}=r.context;const{data:o}=yield p.rest.repos.listTags({owner:a,repo:d,per_page:2});let m;if(o.length>0){if(s===o[0].commit.sha){if(o.length>1)m=o[1].commit.sha}else m=o[0].commit.sha}const l=yield(0,i.generate)({octokit:p,owner:a,repo:d,sha:s,tagRef:m});(0,t.info)(l);(0,t.setOutput)("changelog",l)}))}run().catch((e=>(0,t.setFailed)(e.message)))},7351:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=Line truncated
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"sources":["../webpack:/auto-changelog/dist/changelog.js","../webpack:/auto-changelog/dist/constants.js","../webpack:/auto-changelog/dist/index.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/core.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/file-command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/context.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/github.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/internal/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/http-client/auth.js","../webpack:/auto-changelog/node_modules/@actions/http-client/index.js","../webpack:/auto-changelog/node_modules/@actions/http-client/proxy.js","../webpack:/auto-changelog/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/core/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request/dist-node/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/add.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/register.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/remove.js","../webpack:/auto-changelog/node_modules/deprecation/dist-node/index.js","../webpack:/auto-changelog/node_modules/is-plain-object/dist/is-plain-object.js","../webpack:/auto-changelog/node_modules/node-fetch/lib/index.js","../webpack:/auto-changelog/node_modules/once/once.js","../webpack:/auto-changelog/node_modules/tr46/index.js","../webpack:/auto-changelog/node_modules/tunnel/index.js","../webpack:/auto-changelog/node_modules/tunnel/lib/tunnel.js","../webpack:/auto-changelog/node_modules/universal-user-agent/dist-node/index.js","../webpack:/auto-changelog/node_modules/webidl-conversions/lib/index.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/URL-impl.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/URL.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/public-api.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/url-state-machine.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/utils.js","../webpack:/auto-changelog/node_modules/wrappy/wrappy.js","../webpack:/auto-changelog/node_modules/@vercel/ncc/dist/ncc/@@notfound.js","../webpack:/auto-changelog/external node-commonjs \"assert\"","../webpack:/auto-changelog/external node-commonjs \"events\"","../webpack:/auto-changelog/external node-commonjs \"fs\"","../webpack:/auto-changelog/external node-commonjs \"http\"","../webpack:/auto-changelog/external node-commonjs \"https\"","../webpack:/auto-changelog/external node-commonjs \"net\"","../webpack:/auto-changelog/external node-commonjs \"os\"","../webpack:/auto-changelog/external node-commonjs \"path\"","../webpack:/auto-changelog/external node-commonjs \"punycode\"","../webpack:/auto-changelog/external node-commonjs \"stream\"","../webpack:/auto-changelog/external node-commonjs \"tls\"","../webpack:/auto-changelog/external node-commonjs \"url\"","../webpack:/auto-changelog/external node-commonjs \"util\"","../webpack:/auto-changelog/external node-commonjs \"zlib\"","../webpack:/auto-changelog/webpack/bootstrap","../webpack:/auto-changelog/webpack/runtime/compat","../webpack:/auto-changelog/webpack/startup"],"names":["__awaiter","this","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__asyncValues","o","Symbol","asyncIterator","TypeError","m","i","call","__values","iterator","verb","n","v","settle","d","__rest","s","t","p","Object","prototype","hasOwnProperty","indexOf","getOwnPropertySymbols","length","propertyIsEnumerable","defineProperty","exports","generate","constants_1","__webpack_require__","input","e_1","_a","_b","_c","_d","octokit","exclude","owner","repo","sha","tagRef","repoUrl","commits","paginator","_e","paginate","rest","repos","listCommits","per_page","_f","data","_g","commit","message","split","type","category","title","flag","COMMIT_REGEX","exec","trim","TYPES","other","replace","PR_REGEX","match","pull","existingIndex","findIndex","push","e_1_1","error","return","values","filter","inclLine truncated
|
||||
{"version":3,"sources":["../webpack:/auto-changelog/dist/changelog.js","../webpack:/auto-changelog/dist/constants.js","../webpack:/auto-changelog/dist/index.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/core.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/file-command.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/auto-changelog/node_modules/@actions/core/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/context.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/github.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/internal/utils.js","../webpack:/auto-changelog/node_modules/@actions/github/lib/utils.js","../webpack:/auto-changelog/node_modules/@actions/http-client/auth.js","../webpack:/auto-changelog/node_modules/@actions/http-client/index.js","../webpack:/auto-changelog/node_modules/@actions/http-client/proxy.js","../webpack:/auto-changelog/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/core/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/auto-changelog/node_modules/@octokit/request/dist-node/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/index.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/add.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/register.js","../webpack:/auto-changelog/node_modules/before-after-hook/lib/remove.js","../webpack:/auto-changelog/node_modules/deprecation/dist-node/index.js","../webpack:/auto-changelog/node_modules/is-plain-object/dist/is-plain-object.js","../webpack:/auto-changelog/node_modules/node-fetch/lib/index.js","../webpack:/auto-changelog/node_modules/once/once.js","../webpack:/auto-changelog/node_modules/tr46/index.js","../webpack:/auto-changelog/node_modules/tunnel/index.js","../webpack:/auto-changelog/node_modules/tunnel/lib/tunnel.js","../webpack:/auto-changelog/node_modules/universal-user-agent/dist-node/index.js","../webpack:/auto-changelog/node_modules/webidl-conversions/lib/index.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/URL-impl.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/URL.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/public-api.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/url-state-machine.js","../webpack:/auto-changelog/node_modules/whatwg-url/lib/utils.js","../webpack:/auto-changelog/node_modules/wrappy/wrappy.js","../webpack:/auto-changelog/node_modules/@vercel/ncc/dist/ncc/@@notfound.js","../webpack:/auto-changelog/external node-commonjs \"assert\"","../webpack:/auto-changelog/external node-commonjs \"events\"","../webpack:/auto-changelog/external node-commonjs \"fs\"","../webpack:/auto-changelog/external node-commonjs \"http\"","../webpack:/auto-changelog/external node-commonjs \"https\"","../webpack:/auto-changelog/external node-commonjs \"net\"","../webpack:/auto-changelog/external node-commonjs \"os\"","../webpack:/auto-changelog/external node-commonjs \"path\"","../webpack:/auto-changelog/external node-commonjs \"punycode\"","../webpack:/auto-changelog/external node-commonjs \"stream\"","../webpack:/auto-changelog/external node-commonjs \"tls\"","../webpack:/auto-changelog/external node-commonjs \"url\"","../webpack:/auto-changelog/external node-commonjs \"util\"","../webpack:/auto-changelog/external node-commonjs \"zlib\"","../webpack:/auto-changelog/webpack/bootstrap","../webpack:/auto-changelog/webpack/runtime/compat","../webpack:/auto-changelog/webpack/startup"],"names":["__awaiter","this","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__asyncValues","o","Symbol","asyncIterator","TypeError","m","i","call","__values","iterator","verb","n","v","settle","d","__rest","s","t","p","Object","prototype","hasOwnProperty","indexOf","getOwnPropertySymbols","length","propertyIsEnumerable","defineProperty","exports","generate","constants_1","__webpack_require__","input","e_1","_a","_b","_c","_d","octokit","owner","repo","sha","tagRef","repoUrl","commits","paginator","_e","paginate","rest","repos","listCommits","per_page","_f","data","_g","commit","message","split","type","category","title","flag","COMMIT_REGEX","exec","trim","TYPES","other","replace","PR_REGEX","match","pull","existingIndex","findIndex","push","e_1_1","error","return","values","reduce","changelog","tyLine truncated
|
||||
+1
-2
@@ -1,7 +1,7 @@
|
||||
import { COMMIT_REGEX, InputI, LogsI, PR_REGEX, TYPES } from "./constants";
|
||||
|
||||
export async function generate(input: InputI): Promise<string> {
|
||||
const { octokit, exclude, owner, repo, sha, tagRef } = input;
|
||||
const { octokit, owner, repo, sha, tagRef } = input;
|
||||
|
||||
const repoUrl = `https://github.com/${owner}/${repo}`;
|
||||
const commits: LogsI = {};
|
||||
@@ -51,7 +51,6 @@ export async function generate(input: InputI): Promise<string> {
|
||||
}
|
||||
|
||||
return Object.values(TYPES)
|
||||
.filter((type) => !exclude.includes(type))
|
||||
.reduce((changelog, type) => {
|
||||
const typeGroup = commits[type];
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ export interface LogI {
|
||||
|
||||
export interface InputI {
|
||||
octokit: InstanceType<typeof GitHub>;
|
||||
exclude: string[];
|
||||
owner: string;
|
||||
repo: string;
|
||||
sha: string;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import { getInput, info, setFailed, setOutput } from "@actions/core";
|
||||
import { context, getOctokit } from "@actions/github";
|
||||
import { generate } from "./changelog";
|
||||
import { TYPES } from "./constants";
|
||||
|
||||
async function run() {
|
||||
const token = getInput("token", { required: true });
|
||||
const exclude = getInput("exclude", { required: false })
|
||||
.split(",")
|
||||
.map((type) => TYPES[type] ?? type);
|
||||
|
||||
const octokit = getOctokit(token);
|
||||
|
||||
@@ -32,7 +28,6 @@ async function run() {
|
||||
|
||||
const changelog = await generate({
|
||||
octokit,
|
||||
exclude,
|
||||
owner,
|
||||
repo,
|
||||
sha,
|
||||
|
||||
Reference in new issue
Block a user