Skip to content

Commit

Permalink
Merge branch 'main' into debug-module
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Mar 24, 2024
2 parents 99969b2 + 3c63740 commit 88a7ded
Show file tree
Hide file tree
Showing 464 changed files with 3,512 additions and 1,604 deletions.
6 changes: 0 additions & 6 deletions .github/workflow-resources/.lsifrc.json

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,14 @@ jobs:
- run: npm ci

- name: Tests
id: test
# run tests, but lint separately
run: npm run test -- --no-lint --bundle=${{ matrix.bundle }}

- name: Print baseline diff on failure
if: ${{ failure() && steps.test.conclusion == 'failure' }}
run: git diff --diff-filter=AM --no-index -- ./tests/baselines/reference ./tests/baselines/local

lint:
runs-on: ubuntu-latest

Expand Down
48 changes: 44 additions & 4 deletions .github/workflows/create-cherry-pick-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,35 @@ jobs:
await exec.exec("git", ["config", "user.name", "TypeScript Bot"]);
await exec.exec("git", ["switch", "--detach", `origin/${TARGET_BRANCH}`]);
await exec.exec("git", ["switch", "-c", pickBranch]);
await exec.exec("git", ["cherry-pick", "-m", "1", pr.data.merge_commit_sha]);
let updatedBaselinesMessage = "";
try {
await exec.exec("git", ["cherry-pick", "-m", "1", pr.data.merge_commit_sha]);
} catch (e) {
console.log(e);
// The cherry-pick failed. If all of the conflicts are in tests/baselines,
// try to run the tests and accept the new baselines.
await exec.exec("git", ["add", "tests/baselines"]);
// This will fail if any other files were modified.
await exec.exec("git", ["-c", "core.editor=true", "cherry-pick", "--continue"]);
await exec.exec("npm", ["ci"]);
try {
await exec.exec("npm", ["test", "--", "--no-lint"]);
} catch {
// Expected to fail.
}
await exec.exec("npx", ["hereby", "baseline-accept"]);
await exec.exec("git", ["add", "tests/baselines"]);
await exec.exec("git", ["commit", "-m", "Update baselines"]);
updatedBaselinesMessage = " This involved updating baselines; please check the diff.";
}
await exec.exec("git", ["push", "--force", "--set-upstream", "origin", pickBranch]);
const existingPulls = await github.rest.pulls.list({
Expand All @@ -106,7 +134,7 @@ jobs:
if (existingPulls.data.length === 0) {
console.log(`No existing PRs found for ${pickBranch}`);
const body = `This cherry-pick was triggered by a request on #${PR}.\n\nPlease review the diff and merge if no changes are unexpected.`;
const body = `This cherry-pick was triggered by a request on #${PR}.\n\nPlease review the diff and merge if no changes are unexpected.${updatedBaselinesMessage}`;
const newPr = await github.rest.pulls.create({
owner: context.repo.owner,
Expand All @@ -115,11 +143,23 @@ jobs:
head: pickBranch,
title,
body,
});
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: newPr.data.number,
assignees: ["DanielRosenwasser"],
});
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: newPr.data.number,
reviewers: ["DanielRosenwasser", REQUESTING_USER],
});
commentBody = `I've created #${newPr.data.number} for you.`;
commentBody = `I've created #${newPr.data.number} for you.${updatedBaselinesMessage}`;
}
else {
const existing = existingPulls.data[0];
Expand All @@ -132,7 +172,7 @@ jobs:
title,
});
commentBody = `I've updated #${existing.number} for you.`;
commentBody = `I've updated #${existing.number} for you.${updatedBaselinesMessage}`;
}
return commentBody;
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/rich-navigation.yml

This file was deleted.

Loading

0 comments on commit 88a7ded

Please sign in to comment.