Skip to content

Bump typescript from 5.4.5 to 5.5.3 #478

Bump typescript from 5.4.5 to 5.5.3

Bump typescript from 5.4.5 to 5.5.3 #478

Workflow file for this run

name: JSON diff
on: pull_request_target
jobs:
json-diff:
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
path: current
- name: Checkout old version
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
repository: ${{ github.event.pull_request.base.repo.full_name }}
fetch-depth: 0
path: old
- uses: actions/setup-node@v4.0.2
- name: Install dependencies
run: |
sudo apt-get install jq diffutils
- name: Generate json map files for diffing
run: |
pushd old/
yarn install --frozen-lockfile
node ./map-utilities/generate-map.js
node ./map-utilities/generate-map.js --base-dir ../current
popd
- name: get JSON diff
run: |
echo '## Textual map diff' > output.txt
echo '<details>' >> output.txt
echo '<summary>Open to see the diff for commit ${{ github.event.pull_request.head.sha }}</summary>' >> output.txt
echo '' >> output.txt
echo '```diff' >> output.txt
./old/map-utilities/create-diff.sh >> output.txt
echo '```' >> output.txt
echo '' >> output.txt
echo '</details>' >> output.txt
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Textual map diff
- name: Create or update comment
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const commentBody = fs.readFileSync('output.txt', 'utf8');
const commentId = "${{ steps.fc.outputs.comment-id }}";
if(commentId){
github.rest.issues.updateComment({
comment_id: commentId,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
})
} else {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
})
}