Skip to content

Commit b103153

Browse files
committed
Revert changes to .github/workflows/check-changeset.yml and scripts/ci/check_changeset.ts since they have been moved to a separate PR (#7964)
1 parent 7421627 commit b103153

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

.github/workflows/check-changeset.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ jobs:
4747
yarn ts-node-script scripts/ci/check_changeset.ts
4848
id: check-changeset
4949
- name: Print changeset checker output
50-
run: |
51-
cat << 'eof_delimiter_that_will_never_occur_in_CHANGESET_ERROR_MESSAGE'
52-
${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}
53-
eof_delimiter_that_will_never_occur_in_CHANGESET_ERROR_MESSAGE
50+
run: echo "${{steps.check-changeset.outputs.CHANGESET_ERROR_MESSAGE}}"
5451
- name: Print blocking failure status
5552
run: echo "${{steps.check-changeset.outputs.BLOCKING_FAILURE}}"
5653
- name: Find Comment

scripts/ci/check_changeset.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import { resolve } from 'path';
1919
import { existsSync } from 'fs';
20-
import { writeFile } from 'fs/promises';
2120
import { exec } from 'child-process-promise';
2221
import chalk from 'chalk';
2322
import simpleGit from 'simple-git';
@@ -29,14 +28,6 @@ const git = simpleGit(root);
2928
const baseRef = process.env.GITHUB_PULL_REQUEST_BASE_SHA || 'master';
3029
const headRef = process.env.GITHUB_PULL_REQUEST_HEAD_SHA || 'HEAD';
3130

32-
const githubOutputFile = (function (): string {
33-
const value = process.env.GITHUB_OUTPUT;
34-
if (!value) {
35-
throw new Error('GITHUB_OUTPUT environment variable must be set');
36-
}
37-
return value;
38-
})();
39-
4031
// Version bump text converted to rankable numbers.
4132
const bumpRank: Record<string, number> = {
4233
'patch': 0,
@@ -214,13 +205,10 @@ async function main() {
214205
* step. See:
215206
* https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
216207
*/
217-
if (errors.length > 0) {
218-
await writeFile(
219-
githubOutputFile,
220-
`CHANGESET_ERROR_MESSAGE=${errors.join('%0A')}\n`,
221-
{ flag: 'a' }
208+
if (errors.length > 0)
209+
await exec(
210+
`echo "CHANGESET_ERROR_MESSAGE=${errors.join('%0A')}" >> $GITHUB_OUTPUT`
222211
);
223-
}
224212
process.exit();
225213
}
226214

0 commit comments

Comments
 (0)