Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/create-release-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:

- run: node --run scripts:release-post -- "$VERSION"
working-directory: apps/site
id: release-post
env:
VERSION: ${{ inputs.version }}

Expand All @@ -54,4 +55,5 @@ jobs:
commit-message: 'feat(blog): create post for ${{ inputs.version }}'
labels: fast-track
title: 'feat(blog): create post for ${{ inputs.version }}'
assignees: ${{ steps.release-post.outputs.author }}
draft: true
12 changes: 10 additions & 2 deletions apps/site/scripts/release-post/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

'use strict';

import { existsSync, readFileSync } from 'node:fs';
import { existsSync, readFileSync, appendFileSync } from 'node:fs';
import { writeFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import { parseArgs } from 'node:util';
Expand Down Expand Up @@ -125,7 +125,15 @@ const fetchAuthor = version => {
return fetchChangelog(version)
.then(section => findAuthorLogin(version, section))
.then(author => request({ url: URLS.GITHUB_PROFILE(author), json: true }))
.then(githubRes => githubRes.name);
.then(({ name, login }) => {
if (process.env.GITHUB_OUTPUT) {
// If we are running in a GitHub runner, we need to store the username
// so that the PR can be assigned to them
appendFileSync(process.env.GITHUB_OUTPUT, `author=${login}\n`);
}

return name;
});
};

const fetchChangelog = version => {
Expand Down
Loading