Skip to content

Commit 17a987d

Browse files
authored
Switch GHA workflows for LF line endings to work around dependabot bug (microsoft#56944)
1 parent 02f9ddf commit 17a987d

11 files changed

+543
-542
lines changed

.dprint.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"importDeclaration.sortNamedImports": "maintain"
3131
},
3232
"prettier": {
33+
"newLineKind": "lf",
3334
"associations": [
3435
"**/*.{yaml,yml}"
3536
],

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
---
2-
blank_issues_enabled: false
3-
contact_links:
4-
- about: 'Please ask and answer usage questions on Stack Overflow.'
5-
name: Question
6-
url: 'https://stackoverflow.com/questions/tagged/typescript'
7-
- about: 'Alternatively, you can use the TypeScript Community Discord.'
8-
name: Chat
9-
url: 'https://discord.gg/typescript'
10-
- about: 'Please check the FAQ before filing new issues'
11-
name: 'TypeScript FAQ'
12-
url: 'https://github.com/microsoft/TypeScript/wiki/FAQ'
13-
- about: 'Please raise issues about the site on its own repo.'
14-
name: Website
15-
url: 'https://github.com/microsoft/TypeScript-Website/issues/new'
1+
---
2+
blank_issues_enabled: false
3+
contact_links:
4+
- about: 'Please ask and answer usage questions on Stack Overflow.'
5+
name: Question
6+
url: 'https://stackoverflow.com/questions/tagged/typescript'
7+
- about: 'Alternatively, you can use the TypeScript Community Discord.'
8+
name: Chat
9+
url: 'https://discord.gg/typescript'
10+
- about: 'Please check the FAQ before filing new issues'
11+
name: 'TypeScript FAQ'
12+
url: 'https://github.com/microsoft/TypeScript/wiki/FAQ'
13+
- about: 'Please raise issues about the site on its own repo.'
14+
name: Website
15+
url: 'https://github.com/microsoft/TypeScript-Website/issues/new'

.github/workflows/close-issues.yml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
name: Close issues
2-
3-
on:
4-
schedule:
5-
- cron: '0 1 * * *'
6-
workflow_dispatch:
7-
8-
permissions:
9-
contents: read
10-
11-
# Ensure scripts are run with pipefail. See:
12-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
13-
defaults:
14-
run:
15-
shell: bash
16-
17-
jobs:
18-
close-issues:
19-
runs-on: ubuntu-latest
20-
if: github.repository == 'microsoft/TypeScript'
21-
permissions:
22-
contents: read # Apparently required to create issues
23-
issues: write
24-
25-
steps:
26-
- name: Close issues
27-
env:
28-
GH_TOKEN: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
29-
run: |
30-
DATE=$(date --date='2 days ago' --iso-8601)
31-
32-
close_issues() {
33-
echo "Closing issues marked as '$1'."
34-
for issue in $(gh issue list --limit 100 --label "$1" --repo ${{ github.repository }} --state open --search "updated:<$DATE" --json number --jq '.[].number'); do
35-
echo "Closing https://github.com/${{ github.repository }}/issues/$issue"
36-
gh issue close $issue --repo ${{ github.repository }} --reason "not planned" --comment "This issue has been marked as \"$1\" and has seen no recent activity. It has been automatically closed for house-keeping purposes."
37-
done
38-
}
39-
40-
close_issues "Duplicate"
41-
close_issues "Unactionable"
42-
close_issues "Not a Defect"
43-
close_issues "External"
44-
close_issues "Working as Intended"
45-
close_issues "Question"
46-
close_issues "Out of Scope"
47-
close_issues "Declined"
48-
close_issues "Won't Fix"
49-
close_issues "Too Complex"
1+
name: Close issues
2+
3+
on:
4+
schedule:
5+
- cron: '0 1 * * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
# Ensure scripts are run with pipefail. See:
12+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
jobs:
18+
close-issues:
19+
runs-on: ubuntu-latest
20+
if: github.repository == 'microsoft/TypeScript'
21+
permissions:
22+
contents: read # Apparently required to create issues
23+
issues: write
24+
25+
steps:
26+
- name: Close issues
27+
env:
28+
GH_TOKEN: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
29+
run: |
30+
DATE=$(date --date='2 days ago' --iso-8601)
31+
32+
close_issues() {
33+
echo "Closing issues marked as '$1'."
34+
for issue in $(gh issue list --limit 100 --label "$1" --repo ${{ github.repository }} --state open --search "updated:<$DATE" --json number --jq '.[].number'); do
35+
echo "Closing https://github.com/${{ github.repository }}/issues/$issue"
36+
gh issue close $issue --repo ${{ github.repository }} --reason "not planned" --comment "This issue has been marked as \"$1\" and has seen no recent activity. It has been automatically closed for house-keeping purposes."
37+
done
38+
}
39+
40+
close_issues "Duplicate"
41+
close_issues "Unactionable"
42+
close_issues "Not a Defect"
43+
close_issues "External"
44+
close_issues "Working as Intended"
45+
close_issues "Question"
46+
close_issues "Out of Scope"
47+
close_issues "Declined"
48+
close_issues "Won't Fix"
49+
close_issues "Too Complex"
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
name: 'typescript-error-deltas Watchdog'
2-
3-
on:
4-
workflow_dispatch:
5-
schedule:
6-
- cron: '0 0 * * 3' # Every Wednesday
7-
8-
permissions:
9-
contents: read
10-
11-
# Ensure scripts are run with pipefail. See:
12-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
13-
defaults:
14-
run:
15-
shell: bash
16-
17-
jobs:
18-
check-for-recent:
19-
runs-on: ubuntu-latest
20-
if: github.repository == 'microsoft/TypeScript'
21-
permissions:
22-
contents: read # Apparently required to create issues
23-
issues: write
24-
env:
25-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26-
TAGS: '@navya9singh @RyanCavanaugh @DanielRosenwasser'
27-
steps:
28-
- name: NewErrors
29-
run: | # --json and --jq prints exactly one issue number per line of output
30-
DATE=$(date --date="7 days ago" --iso-8601)
31-
gh issue list --repo microsoft/typescript --search "[NewErrors] created:>=$DATE" --state all --json number --jq ".[].number" \
32-
| grep -qe "[0-9]" \
33-
|| gh issue create --repo ${{ github.repository }} --title "No NewErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=48)."
34-
- name: ServerErrors TS
35-
run: |
36-
DATE=$(date --date="7 days ago" --iso-8601)
37-
gh issue list --repo microsoft/typescript --search "[ServerErrors][TypeScript] created:>=$DATE" --state all --json number --jq ".[].number" \
38-
| grep -qe "[0-9]" \
39-
|| gh issue create --repo ${{ github.repository }} --title "No TypeScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=59)."
40-
- name: ServerErrors JS
41-
run: |
42-
DATE=$(date --date="7 days ago" --iso-8601)
43-
gh issue list --repo microsoft/typescript --search "[ServerErrors][JavaScript] created:>=$DATE" --state all --json number --jq ".[].number" \
44-
| grep -qe "[0-9]" \
45-
|| gh issue create --repo ${{ github.repository }} --title "No JavaScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=58)."
1+
name: 'typescript-error-deltas Watchdog'
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * 3' # Every Wednesday
7+
8+
permissions:
9+
contents: read
10+
11+
# Ensure scripts are run with pipefail. See:
12+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
jobs:
18+
check-for-recent:
19+
runs-on: ubuntu-latest
20+
if: github.repository == 'microsoft/TypeScript'
21+
permissions:
22+
contents: read # Apparently required to create issues
23+
issues: write
24+
env:
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
TAGS: '@navya9singh @RyanCavanaugh @DanielRosenwasser'
27+
steps:
28+
- name: NewErrors
29+
run: | # --json and --jq prints exactly one issue number per line of output
30+
DATE=$(date --date="7 days ago" --iso-8601)
31+
gh issue list --repo microsoft/typescript --search "[NewErrors] created:>=$DATE" --state all --json number --jq ".[].number" \
32+
| grep -qe "[0-9]" \
33+
|| gh issue create --repo ${{ github.repository }} --title "No NewErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=48)."
34+
- name: ServerErrors TS
35+
run: |
36+
DATE=$(date --date="7 days ago" --iso-8601)
37+
gh issue list --repo microsoft/typescript --search "[ServerErrors][TypeScript] created:>=$DATE" --state all --json number --jq ".[].number" \
38+
| grep -qe "[0-9]" \
39+
|| gh issue create --repo ${{ github.repository }} --title "No TypeScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=59)."
40+
- name: ServerErrors JS
41+
run: |
42+
DATE=$(date --date="7 days ago" --iso-8601)
43+
gh issue list --repo microsoft/typescript --search "[ServerErrors][JavaScript] created:>=$DATE" --state all --json number --jq ".[].number" \
44+
| grep -qe "[0-9]" \
45+
|| gh issue create --repo ${{ github.repository }} --title "No JavaScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=58)."
Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
name: New Release Branch
2-
3-
on:
4-
repository_dispatch:
5-
types: [new-release-branch]
6-
7-
permissions:
8-
contents: read
9-
10-
# Ensure scripts are run with pipefail. See:
11-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
12-
defaults:
13-
run:
14-
shell: bash
15-
16-
jobs:
17-
build:
18-
runs-on: ubuntu-latest
19-
20-
steps:
21-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
22-
with:
23-
filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
24-
fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
25-
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
26-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
27-
- run: |
28-
npm --version
29-
# corepack enable npm
30-
npm install -g $(jq -r '.packageManager' < package.json)
31-
npm --version
32-
- run: |
33-
git checkout -b ${{ github.event.client_payload.branch_name }}
34-
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
35-
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
36-
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
37-
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
38-
sed -i -e 's/const version\(: string\)\{0,1\} = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts
39-
npm ci
40-
npm install # update package-lock.json to ensure the version bump is included
41-
npx hereby LKG
42-
npm test
43-
git diff
44-
git add package.json package-lock.json
45-
git add src/compiler/corePublic.ts
46-
git add tests/baselines/reference/api/typescript.d.ts
47-
git add tests/baselines/reference/api/tsserverlibrary.d.ts
48-
git add --force ./lib
49-
git config user.email "[email protected]"
50-
git config user.name "TypeScript Bot"
51-
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
52-
git push --set-upstream origin ${{ github.event.client_payload.branch_name }}
1+
name: New Release Branch
2+
3+
on:
4+
repository_dispatch:
5+
types: [new-release-branch]
6+
7+
permissions:
8+
contents: read
9+
10+
# Ensure scripts are run with pipefail. See:
11+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
22+
with:
23+
filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
24+
fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none.
25+
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
26+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
27+
- run: |
28+
npm --version
29+
# corepack enable npm
30+
npm install -g $(jq -r '.packageManager' < package.json)
31+
npm --version
32+
- run: |
33+
git checkout -b ${{ github.event.client_payload.branch_name }}
34+
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
35+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
36+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
37+
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
38+
sed -i -e 's/const version\(: string\)\{0,1\} = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts
39+
npm ci
40+
npm install # update package-lock.json to ensure the version bump is included
41+
npx hereby LKG
42+
npm test
43+
git diff
44+
git add package.json package-lock.json
45+
git add src/compiler/corePublic.ts
46+
git add tests/baselines/reference/api/typescript.d.ts
47+
git add tests/baselines/reference/api/tsserverlibrary.d.ts
48+
git add --force ./lib
49+
git config user.email "[email protected]"
50+
git config user.name "TypeScript Bot"
51+
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
52+
git push --set-upstream origin ${{ github.event.client_payload.branch_name }}

0 commit comments

Comments
 (0)