Skip to content

Commit c544038

Browse files
authored
Merge pull request #12 from ipshipyard/master-upgrade
upgrade@14562997789
2 parents 0eb4923 + 18996e7 commit c544038

File tree

5 files changed

+47
-23
lines changed

5 files changed

+47
-23
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4949
- updated upload and download artifacts actions to v4
5050

5151
### Fixed
52+
- do not break long file content lines
5253
- source TF_WORKING_DIR from env helper instead of process.env in locals helper
5354
- fixed how terraform state is accessed before it the initial synchronization
5455
- links to supported resources in HOWTOs

github/ipshipyard.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ repositories:
2626
has_discussions: false
2727
merge_commit_message: PR_TITLE
2828
merge_commit_title: MERGE_MESSAGE
29-
secret_scanning_push_protection: false
30-
secret_scanning: false
29+
secret_scanning_push_protection: true
30+
secret_scanning: true
3131
squash_merge_commit_message: COMMIT_MESSAGES
3232
squash_merge_commit_title: COMMIT_OR_PR_TITLE
3333
visibility: public
@@ -62,8 +62,8 @@ repositories:
6262
has_discussions: false
6363
merge_commit_message: PR_TITLE
6464
merge_commit_title: MERGE_MESSAGE
65-
secret_scanning_push_protection: false
66-
secret_scanning: false
65+
secret_scanning_push_protection: true
66+
secret_scanning: true
6767
squash_merge_commit_message: COMMIT_MESSAGES
6868
squash_merge_commit_title: COMMIT_OR_PR_TITLE
6969
visibility: public
@@ -79,8 +79,8 @@ repositories:
7979
has_discussions: false
8080
merge_commit_message: PR_TITLE
8181
merge_commit_title: MERGE_MESSAGE
82-
secret_scanning_push_protection: false
83-
secret_scanning: false
82+
secret_scanning_push_protection: true
83+
secret_scanning: true
8484
squash_merge_commit_message: COMMIT_MESSAGES
8585
squash_merge_commit_title: COMMIT_OR_PR_TITLE
8686
visibility: public
@@ -97,8 +97,8 @@ repositories:
9797
has_discussions: false
9898
merge_commit_message: PR_TITLE
9999
merge_commit_title: MERGE_MESSAGE
100-
secret_scanning_push_protection: false
101-
secret_scanning: false
100+
secret_scanning_push_protection: true
101+
secret_scanning: true
102102
squash_merge_commit_message: COMMIT_MESSAGES
103103
squash_merge_commit_title: COMMIT_OR_PR_TITLE
104104
visibility: public
@@ -116,8 +116,8 @@ repositories:
116116
has_discussions: false
117117
merge_commit_message: PR_TITLE
118118
merge_commit_title: MERGE_MESSAGE
119-
secret_scanning_push_protection: false
120-
secret_scanning: false
119+
secret_scanning_push_protection: true
120+
secret_scanning: true
121121
squash_merge_commit_message: COMMIT_MESSAGES
122122
squash_merge_commit_title: COMMIT_OR_PR_TITLE
123123
topics:
@@ -145,8 +145,8 @@ repositories:
145145
has_discussions: false
146146
merge_commit_message: PR_TITLE
147147
merge_commit_title: MERGE_MESSAGE
148-
secret_scanning_push_protection: false
149-
secret_scanning: false
148+
secret_scanning_push_protection: true
149+
secret_scanning: true
150150
squash_merge_commit_message: COMMIT_MESSAGES
151151
squash_merge_commit_title: COMMIT_OR_PR_TITLE
152152
topics:
@@ -183,8 +183,8 @@ repositories:
183183
has_discussions: false
184184
merge_commit_message: PR_TITLE
185185
merge_commit_title: MERGE_MESSAGE
186-
secret_scanning_push_protection: false
187-
secret_scanning: false
186+
secret_scanning_push_protection: true
187+
secret_scanning: true
188188
squash_merge_commit_message: COMMIT_MESSAGES
189189
squash_merge_commit_title: COMMIT_OR_PR_TITLE
190190
visibility: public
@@ -218,8 +218,8 @@ repositories:
218218
has_discussions: false
219219
merge_commit_message: PR_TITLE
220220
merge_commit_title: MERGE_MESSAGE
221-
secret_scanning_push_protection: false
222-
secret_scanning: false
221+
secret_scanning_push_protection: true
222+
secret_scanning: true
223223
squash_merge_commit_message: COMMIT_MESSAGES
224224
squash_merge_commit_title: COMMIT_OR_PR_TITLE
225225
visibility: public
@@ -235,8 +235,8 @@ repositories:
235235
has_discussions: false
236236
merge_commit_message: PR_TITLE
237237
merge_commit_title: MERGE_MESSAGE
238-
secret_scanning_push_protection: false
239-
secret_scanning: false
238+
secret_scanning_push_protection: true
239+
secret_scanning: true
240240
squash_merge_commit_message: COMMIT_MESSAGES
241241
squash_merge_commit_title: COMMIT_OR_PR_TITLE
242242
visibility: public
@@ -252,8 +252,8 @@ repositories:
252252
has_discussions: false
253253
merge_commit_message: PR_TITLE
254254
merge_commit_title: MERGE_MESSAGE
255-
secret_scanning_push_protection: false
256-
secret_scanning: false
255+
secret_scanning_push_protection: true
256+
secret_scanning: true
257257
squash_merge_commit_message: COMMIT_MESSAGES
258258
squash_merge_commit_title: COMMIT_OR_PR_TITLE
259259
teams:
@@ -297,8 +297,8 @@ repositories:
297297
has_discussions: false
298298
merge_commit_message: PR_TITLE
299299
merge_commit_title: MERGE_MESSAGE
300-
secret_scanning_push_protection: false
301-
secret_scanning: false
300+
secret_scanning_push_protection: true
301+
secret_scanning: true
302302
squash_merge_commit_message: COMMIT_MESSAGES
303303
squash_merge_commit_title: COMMIT_OR_PR_TITLE
304304
visibility: public

scripts/__tests__/yaml/config.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,25 @@ repositories:
477477
assert.equal(previouslyUnarchivedRepository.archived, true)
478478
assert.equal(previouslyUnarchivedRepository.visibility, undefined)
479479
})
480+
481+
it("doesn't break long lines on format or toString", async () => {
482+
const lines = [
483+
'# This is a very long comment that should NOT be broken down - this is a very long comment that should NOT be broken down - this is a very long comment that should NOT be broken down',
484+
'repositories:',
485+
' test:',
486+
' files:',
487+
' test:',
488+
' content: >',
489+
' This is a very long content that should NOT be broken down - this is a very long content that should NOT be broken down - this is a very long content that should NOT be broken down',
490+
''
491+
]
492+
const source = lines.join('\n')
493+
const config = new Config(source)
494+
495+
assert.equal(config.toString(), source)
496+
497+
config.format()
498+
499+
assert.equal(config.toString(), source)
500+
})
480501
})

scripts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"lint": "eslint \"src/**/*.ts\" \"__tests__/**/*.ts\"",
1212
"lint:fix": "eslint --fix \"src/**/*.ts\" \"__tests__/**/*.ts\"",
1313
"test": "TF_EXEC=false TF_LOCK=false TF_WORKING_DIR=__tests__/__resources__/terraform GITHUB_DIR=__tests__/__resources__/github FILES_DIR=__tests__/__resources__/files GITHUB_ORG=default node --import tsx/esm --test --experimental-test-module-mocks \"__tests__/**/*.test.ts\"",
14+
"test:only": "TF_EXEC=false TF_LOCK=false TF_WORKING_DIR=__tests__/__resources__/terraform GITHUB_DIR=__tests__/__resources__/github FILES_DIR=__tests__/__resources__/files GITHUB_ORG=default node --import tsx/esm --test --test-only --experimental-test-module-mocks \"__tests__/**/*.test.ts\"",
1415
"all": "npm run build && npm run format && npm run lint && npm test",
1516
"schema": "ts-json-schema-generator --tsconfig tsconfig.json --path src/yaml/schema.ts --type ConfigSchema --out ../github/.schema.json",
1617
"main": "node lib/main.js"

scripts/src/yaml/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export class Config {
8686
toString(): string {
8787
return this._document.toString({
8888
collectionStyle: 'block',
89-
singleQuote: false
89+
singleQuote: false,
90+
lineWidth: 0
9091
})
9192
}
9293

0 commit comments

Comments
 (0)