Skip to content

Commit

Permalink
fix(github): release url (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
leocabeza authored Aug 10, 2020
1 parent 8a92ab3 commit 36d2312
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/_utils/blog/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface BlogFeed {
* TODO: for the ngVenezuela blog to work we have to wait until this is
* closed: https://github.com/thepracticaldev/dev.to/issues/3363
*/
const handleBlogFeed = async (feeds: BlogFeed[]) => {
const handleBlogFeed = async (feeds: BlogFeed[]): Promise<void> => {
if (MAIN_GROUP_ID) {
const promises: Promise<void>[] = [];

Expand Down
5 changes: 3 additions & 2 deletions api/_utils/github/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ interface RepoConfig {
const handleGithubFeed = async (
repoConfig: RepoConfig,
tags: string[],
) => {
): Promise<void> => {
if (MAIN_GROUP_ID) {
const promises: Promise<void>[] = [];
const repoMainUrl = repoConfig.feed.replace('releases.atom', '');

tags.forEach(tag => {
const promise = sendMessage({
Expand All @@ -25,7 +26,7 @@ const handleGithubFeed = async (
.replace(
'#{url}',
repoConfig.hasChangelog
? `https://github.com/${repoConfig.name}/blob/master/CHANGELOG.md`
? `${repoMainUrl}blob/master/CHANGELOG.md`
: `https://github.com/${repoConfig.name}/releases/tag/${tag}`,
),
});
Expand Down

0 comments on commit 36d2312

Please sign in to comment.