Skip to content
This repository was archived by the owner on May 5, 2024. It is now read-only.

Commit f2df8d9

Browse files
authored
Merge pull request #27 from hwoarang/allow-unknown-keys
[automatic-releases] Do not drop commits without known type
2 parents dcbea0b + 83ac480 commit f2df8d9

File tree

3 files changed

+97
-1
lines changed

3 files changed

+97
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
## Commits
22
- [[f6f40d9](https://github.com/octocat/Hello-World/commit/f6f40d9fbd1130f7f2357bb54225567dbd7a3793)]: Fix all the bugs (Monalisa Octocat)
3+
- [[a6f40d9](https://github.com/octocat/Hello-World/commit/a6f40d9fbd1130f7f2357bb54225567dbd7a3794)]: tests: Fix tests failures (Monalisa Octocat)

packages/automatic-releases/__tests__/payloads/parsed-commits-non-conforming.json

+95
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,100 @@
9393
"pullRequests": [],
9494
"breakingChange": false
9595
}
96+
},
97+
{
98+
"type": null,
99+
"scope": null,
100+
"subject": null,
101+
"merge": null,
102+
"header": "tests: Fix tests failures",
103+
"body": null,
104+
"footer": null,
105+
"notes": [],
106+
"references": [],
107+
"mentions": [],
108+
"revert": null,
109+
"extra": {
110+
"commit": {
111+
"sha": "a6f40d9fbd1130f7f2357bb54225567dbd7a3794",
112+
"node_id": "MDY6Q29tbWl0MjExNTU5MTQxOjQzOThlZjRlYTZmNWE2MTg4MGNhOTRlY2ZiOGU2MGQxYTM4NDk3ZGQ=",
113+
"commit": {
114+
"author": {
115+
"name": "Monalisa Octocat",
116+
"email": "support@github.com",
117+
"date": "2011-04-14T16:00:49Z"
118+
},
119+
"committer": {
120+
"name": "Monalisa Octocat",
121+
"email": "support@github.com",
122+
"date": "2011-04-14T16:00:49Z"
123+
},
124+
"message": "tests: Fix tests failures",
125+
"tree": {
126+
"sha": "a6f40d9fbd1130f7f2357bb54225567dbd7a3794",
127+
"url": "https://api.github.com/repos/octocat/Hello-World/tree/a6f40d9fbd1130f7f2357bb54225567dbd7a3794"
128+
},
129+
"url": "https://api.github.com/repos/octocat/Hello-World/tree/a6f40d9fbd1130f7f2357bb54225567dbd7a3794",
130+
"comment_count": 0,
131+
"verification": {
132+
"verified": false,
133+
"reason": "unsigned",
134+
"signature": null,
135+
"payload": null
136+
}
137+
},
138+
"url": "https://api.github.com/repos/octocat/Hello-World/commits/a6f40d9fbd1130f7f2357bb54225567dbd7a3794",
139+
"html_url": "https://github.com/octocat/Hello-World/commit/a6f40d9fbd1130f7f2357bb54225567dbd7a3794",
140+
"comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/a6f40d9fbd1130f7f2357bb54225567dbd7a3794/comments",
141+
"author": {
142+
"login": "octocat",
143+
"id": 1,
144+
"node_id": "MDQ6VXNlcjE=",
145+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
146+
"gravatar_id": "",
147+
"url": "https://api.github.com/users/octocat",
148+
"html_url": "https://github.com/octocat",
149+
"followers_url": "https://api.github.com/users/octocat/followers",
150+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
151+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
152+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
153+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
154+
"organizations_url": "https://api.github.com/users/octocat/orgs",
155+
"repos_url": "https://api.github.com/users/octocat/repos",
156+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
157+
"received_events_url": "https://api.github.com/users/octocat/received_events",
158+
"type": "User",
159+
"site_admin": false
160+
},
161+
"committer": {
162+
"login": "octocat",
163+
"id": 1,
164+
"node_id": "MDQ6VXNlcjE=",
165+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
166+
"gravatar_id": "",
167+
"url": "https://api.github.com/users/octocat",
168+
"html_url": "https://github.com/octocat",
169+
"followers_url": "https://api.github.com/users/octocat/followers",
170+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
171+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
172+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
173+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
174+
"organizations_url": "https://api.github.com/users/octocat/orgs",
175+
"repos_url": "https://api.github.com/users/octocat/repos",
176+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
177+
"received_events_url": "https://api.github.com/users/octocat/received_events",
178+
"type": "User",
179+
"site_admin": false
180+
},
181+
"parents": [
182+
{
183+
"url": "https://api.github.com/repos/octocat/Hello-World/commits/f6f40d9fbd1130f7f2357bb54225567dbd7a3793",
184+
"sha": "f6f40d9fbd1130f7f2357bb54225567dbd7a3793"
185+
}
186+
]
187+
},
188+
"pullRequests": [],
189+
"breakingChange": false
190+
}
96191
}
97192
]

packages/automatic-releases/src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const generateChangelogFromParsedCommits = (parsedCommits: ParsedCommits[
130130

131131
// Commits
132132
const commits = parsedCommits
133-
.filter(val => val.type === null)
133+
.filter(val => val.type === null || Object.keys(ConventionalCommitTypes).indexOf(val.type) === -1)
134134
.map(val => getFormattedChangelogEntry(val))
135135
.reduce((acc, line) => `${acc}\n${line}`, '');
136136
if (commits) {

0 commit comments

Comments
 (0)