mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-09 16:52:14 +01:00
update CI to prettify oss-attribution
- also fix TS warnings in invidiousCI.ts
This commit is contained in:
parent
afe8d2a20c
commit
b310152f7f
4 changed files with 111 additions and 5 deletions
3
.github/workflows/update-oss-attribution.yml
vendored
3
.github/workflows/update-oss-attribution.yml
vendored
|
@ -22,6 +22,9 @@ jobs:
|
|||
npm i -g oss-attribution-generator
|
||||
generate-attribution
|
||||
mv ./oss-attribution/attribution.txt ./public/oss-attribution/attribution.txt
|
||||
- name: Prettify attributions
|
||||
run: |
|
||||
cd ci && ts-node prettify.ts
|
||||
|
||||
- name: Create pull request to update list
|
||||
uses: peter-evans/create-pull-request@b4d51739f96fca8047ad065eccef63442d8e99f7
|
||||
|
|
|
@ -16,10 +16,10 @@ if (!existsSync(join(__dirname, "data.json"))) {
|
|||
import * as data from "../ci/data.json";
|
||||
|
||||
type instanceMap = {
|
||||
name: string,
|
||||
url: string,
|
||||
dailyRatios: {ratio: string, label: string }[],
|
||||
thirtyDayUptime: string
|
||||
name: string;
|
||||
url: string;
|
||||
dailyRatios: {ratio: string; label: string }[];
|
||||
thirtyDayUptime: string;
|
||||
}[]
|
||||
|
||||
// only https servers
|
||||
|
|
6
ci/prettify.ts
Normal file
6
ci/prettify.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { writeFile } from 'fs';
|
||||
|
||||
import * as license from "../oss-attribution/licenseInfos.json";
|
||||
|
||||
const result = JSON.stringify(license, null, 2);
|
||||
writeFile("../oss-attribution/licenseInfos.json", result, err => { if (err) return console.log(err) } );
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue