Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge template repository changes: remal-github-actions/template-typescript #679

Merged
merged 1 commit into from
Oct 2, 2024
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
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
"ignoreRestSiblings": true
}
],
"@typescript-eslint/semi": [
"error",
"never"
],
"i18n-text/no-en": "off",
"github/no-then": "off",
"github/array-foreach": "off"
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/cancel-pr-actions-on-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cancel PR actions on merge

on:
pull_request:
types:
- closed
- merged

permissions:
pull-requests: 'read'
checks: 'read'
actions: 'write'

jobs:
cancel-pr-actions-on-merge:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Cancel PR actions on merge
uses: remal-github-actions/cancel-pr-actions@v1
6 changes: 3 additions & 3 deletions update-node-version-in-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const encoding = 'utf8'
const nodeVersionString = process.argv[2]
const nodeVersion = parseInt(nodeVersionString)
if (isNaN(nodeVersion)) {
throw new Error(`Node.js major version should be passed as a script parameter: ${nodeVersionString}`)
throw new Error(`Node.js major version must be passed as a script parameter: ${nodeVersionString}`)
}

function readJsonFile(path) {
Expand Down Expand Up @@ -77,8 +77,8 @@ function writeJsonFile(path, json) {
;(function () {
const content = fs.readFileSync('.github/renovate.json5', encoding)
const modifiedContent = content.replace(
/([ ]*)\/\/\s*\$\$\$sync-with-template-modifiable:\s*constraints\s*\$\$\$[\s\S]*?\/\/\s*\$\$\$sync-with-template-modifiable-end\s*\$\$\$/,
`$1// $$$$$sync-with-template-modifiable: constraints $$$$$\n$1force: {\n$1$1constraints: {\n$1$1$1node: "^${nodeVersion}.9999.9999",\n$1$1},\n$1},\n$1// $$$$$sync-with-template-modifiable-end$$$$$`
/([ ]*)\/\/\s*\$\$\$sync-with-template-modifiable:\s*(force: \{\s*)?constraints\s*\$\$\$[\s\S]*?\/\/\s*\$\$\$sync-with-template-modifiable-end\s*\$\$\$/,
`$1// $$$$$sync-with-template-modifiable: constraints $$$$$\n$1constraints: {\n$1$1node: "^${nodeVersion}.9999.9999",\n$1},\n$1force: {\n$1$1constraints: {\n$1$1$1node: "^${nodeVersion}.9999.9999",\n$1$1},\n$1},\n$1// $$$$$sync-with-template-modifiable-end$$$$$`
)
if (modifiedContent !== content) {
fs.writeFileSync('.github/renovate.json5', modifiedContent, encoding)
Expand Down
Loading