diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/build/README.md | 28 | ||||
-rw-r--r-- | .github/build/find-missing-translations.js | 66 | ||||
-rw-r--r-- | .github/nativefuncs.json | 754 | ||||
-rw-r--r-- | .github/pull_request_template.md | 3 | ||||
-rw-r--r-- | .github/workflows/add-to-project.yml | 19 | ||||
-rw-r--r-- | .github/workflows/compile-check.yml | 30 | ||||
-rw-r--r-- | .github/workflows/encoding.yml | 14 | ||||
-rw-r--r-- | .github/workflows/merge-conflict-auto-label.yml | 19 |
8 files changed, 930 insertions, 3 deletions
diff --git a/.github/build/README.md b/.github/build/README.md new file mode 100644 index 00000000..84d479a3 --- /dev/null +++ b/.github/build/README.md @@ -0,0 +1,28 @@ +# Finding missing translations + +This package contains a script that detects missing translation keys in Titanfall2 translation files contained in this repository (in the `Northstar.Client/mod/resource` folder). + +It uses english translations file as reference. + +You have to launch it **from the repository root folder**: +```shell +node .github/build/find-missing-translations.js +``` +The script will then list all missing translations for all supported languages. + +If you want to display missing keys for a given language, just add it as an argument: +```shell +node .github/build/find-missing-translations.js french +``` + +Here's the list of supported languages: +* english +* french +* german +* italian +* japanese +* mspanish +* portuguese +* russian +* spanish +* tchinese
\ No newline at end of file diff --git a/.github/build/find-missing-translations.js b/.github/build/find-missing-translations.js new file mode 100644 index 00000000..3f6c6c99 --- /dev/null +++ b/.github/build/find-missing-translations.js @@ -0,0 +1,66 @@ +const fs = require('fs'); +const { exit } = require('process'); +const langPath = "Northstar.Client/mod/resource"; +const knownLanguages = ['english', 'french', 'german', 'italian', 'japanese', 'mspanish', 'portuguese', 'russian', 'spanish', 'tchinese']; + + +// Proceed checks before launch +if (![2,3].includes(process.argv.length)) { + console.error('Wrong number of arguments, either call this script with no argument, or with a language.'); + return; +} +const inputLang = process.argv[2]; +if (process.argv.length === 3 && !knownLanguages.includes(inputLang)) { + console.error(`"${inputLang}" is not a valid language.\nValid languages are: ${knownLanguages}`); + return; +} + + +// Get language files names +const langs = fs.readdirSync(langPath) + .filter(lang => lang.indexOf('northstar_client_localisation_') !== -1); + + +function getLanguageKeys (lang) { + if (knownLanguages.indexOf(lang) === -1) return; + return fs.readFileSync(`${langPath}/northstar_client_localisation_${lang}.txt`, {encoding:'utf16le', flag:'r'}) + .split('\n') + .filter(line => line.length !== 0) // remove empty lines + .map(line => line.replaceAll(/\s+/g, ' ').trim()) // remove multiple spaces + .map(line => line.replaceAll('\t', '')) // remove tabs characters + + // keep only lines with translation keys + .filter(line => { + const words = line.split('" "'); + return words.length === 2 && words[1] !== 'english"' + }) + .map(line => line.split('" "')[0].substring(1)); // only keep translation keys (throw values) +} + +// We use english keys as reference for other languages +const englishKeys = getLanguageKeys('english'); +const inputLanguages = inputLang !== undefined ? ["", inputLang] : [...knownLanguages]; +inputLanguages.shift(); + +// Check for each language if there are missing keys +var missingKeysCount = 0; + +for (const language of inputLanguages) { + const languageKeys = getLanguageKeys(language); + const missingKeys = [...englishKeys] // clone + .filter(key => languageKeys.indexOf(key) === -1); + const missingKeysLength = missingKeys.length; + console.log( + missingKeysLength === 0 + ? `✔️ "${language}" doesn't have missing keys.` + : `❌ "${language}" has ${missingKeys.length} missing key${missingKeys.length === 1 ? '' : 's'}:` + ); + + if (missingKeysLength !== 0) { + console.log(missingKeys); + missingKeysCount += missingKeys.length; + } +} + +process.exitCode = missingKeysCount; +exit(); diff --git a/.github/nativefuncs.json b/.github/nativefuncs.json new file mode 100644 index 00000000..889432d7 --- /dev/null +++ b/.github/nativefuncs.json @@ -0,0 +1,754 @@ +{ + "SERVER":[ + { + "name":"NSGetModNames", + "helpText":"", + "returnTypeString":"array<string>", + "argTypes":"" + }, + { + "name":"NSIsModEnabled", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, + { + "name":"NSSetModEnabled", + "helpText":"", + "returnTypeString":"void", + "argTypes":"string modName, bool enabled" + }, + { + "name":"NSGetModDescriptionByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModVersionByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModDownloadLinkByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModLoadPriority", + "helpText":"", + "returnTypeString":"int", + "argTypes":"string modName" + }, + { + "name":"NSIsModRequiredOnClient", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, + { + "name":"NSGetModConvarsByModName", + "helpText":"", + "returnTypeString":"array<string>", + "argTypes":"string modName" + }, + { + "name":"DecodeJSON", + "helpText":"converts a json string to a squirrel table", + "returnTypeString":"table", + "argTypes":"string json, bool fatalParseErrors = false" + }, + { + "name":"EncodeJSON", + "helpText":"converts a squirrel table to a json string", + "returnTypeString":"string", + "argTypes":"table data" + }, + { + "name":"StringToAsset", + "helpText":"converts a given string to an asset", + "returnTypeString":"asset", + "argTypes":"string assetName" + }, + { + "name":"NSGetLocalPlayerUID", + "helpText":"Returns the local player's uid.", + "returnTypeString":"string", + "argTypes":"" + }, + { + "name":"NSEarlyWritePlayerPersistenceForLeave", + "helpText":"", + "returnTypeString":"void", + "argTypes":"entity player" + }, + { + "name":"NSIsWritingPlayerPersistence", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSIsPlayerLocalPlayer", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"entity player" + }, + { + "name":"NSIsDedicated", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSDisconnectPlayer", + "helpText":"Disconnects the player from the server with the given reason", + "returnTypeString":"bool", + "argTypes":"entity player, string reason" + }, + { + "name":"GetUserInfoKVString_Internal", + "helpText":"Gets the string value of a given player's userinfo convar by name", + "returnTypeString":"string", + "argTypes":"entity player, string key, string defaultValue = \"\"" + }, + { + "name":"GetUserInfoKVAsset_Internal", + "helpText":"Gets the asset value of a given player's userinfo convar by name", + "returnTypeString":"asset", + "argTypes":"entity player, string key, asset defaultValue = $\"\"" + }, + { + "name":"GetUserInfoKVInt_Internal", + "helpText":"Gets the int value of a given player's userinfo convar by name", + "returnTypeString":"int", + "argTypes":"entity player, string key, int defaultValue = 0" + }, + { + "name":"GetUserInfoKVFloat_Internal", + "helpText":"Gets the float value of a given player's userinfo convar by name", + "returnTypeString":"float", + "argTypes":"entity player, string key, float defaultValue = 0" + }, + { + "name":"GetUserInfoKVBool_Internal", + "helpText":"Gets the bool value of a given player's userinfo convar by name", + "returnTypeString":"bool", + "argTypes":"entity player, string key, bool defaultValue = false" + }, + { + "name":"NSSendMessage", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int playerIndex, string text, bool isTeam" + }, + { + "name":"NSBroadcastMessage", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int fromPlayerIndex, int toPlayerIndex, string text, bool isTeam, bool isDead, int messageType" + }, + { + "name":"NSGetCurrentModName", + "helpText":"Returns the mod name of the script running this function", + "returnTypeString":"string", + "argTypes":"" + }, + { + "name":"NSGetCallingModName", + "helpText":"Returns the mod name of the script running this function", + "returnTypeString":"string", + "argTypes":"int depth = 0" + }, + { + "name":"NS_InternalMakeHttpRequest", + "helpText":"[Internal use only] Passes the HttpRequest struct fields to be reconstructed in native and used for an http request", + "returnTypeString":"int", + "argTypes":"int method, string baseUrl, table<string, array<string> > headers, table<string, array<string> > queryParams, string contentType, string body, int timeout, string userAgent" + }, + { + "name":"NSIsHttpEnabled", + "helpText":"Whether or not HTTP requests are enabled. You can opt-out by starting the game with -disablehttprequests.", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSIsLocalHttpAllowed", + "helpText":"Whether or not HTTP requests can be made to a private network address. You can enable this by starting the game with -allowlocalhttp.", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NS_InternalLoadFile", + "helpText":"Loads a file asynchronously.", + "returnTypeString":"int", + "argTypes":"string file" + }, + { + "name":"NSSaveFile", + "helpText":"Saves a file.", + "returnTypeString":"void", + "argTypes":"string file, string data" + }, + { + "name":"NSSaveJSONFile", + "helpText":"Converts a squirrel table to a json string, then saves it to a file.", + "returnTypeString":"void", + "argTypes":"string file, table data" + }, + { + "name":"NSDoesFileExist", + "helpText":"Checks whether or not a file exists.", + "returnTypeString":"bool", + "argTypes":"string file" + }, + { + "name":"NSDeleteFile", + "helpText":"Deletes a file.", + "returnTypeString":"bool", + "argTypes":"string file" + }, + { + "name":"NS_InternalGetAllFiles", + "helpText":"Returns an array of all files in a mod's save folder.", + "returnTypeString":"array<string>", + "argTypes":"string path" + }, + { + "name":"NSGetFileSize", + "helpText":"Returns the size of a file, in KB, rounded down.", + "returnTypeString":"int", + "argTypes":"string file" + }, + { + "name":"NSIsFolder", + "helpText":"Returns whether or not a given path leads to a folder.", + "returnTypeString":"bool", + "argTypes":"string path" + } + ], + "CLIENT":[ + { + "name":"NSChatWrite", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int context, string text" + }, + { + "name":"NSChatWriteRaw", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int context, string text" + }, + { + "name":"NSChatWriteLine", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int context, string text" + }, + { + "name":"NSGetModNames", + "helpText":"", + "returnTypeString":"array<string>", + "argTypes":"" + }, + { + "name":"NSIsModEnabled", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, + { + "name":"NSSetModEnabled", + "helpText":"", + "returnTypeString":"void", + "argTypes":"string modName, bool enabled" + }, + { + "name":"NSGetModDescriptionByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModVersionByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModDownloadLinkByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModLoadPriority", + "helpText":"", + "returnTypeString":"int", + "argTypes":"string modName" + }, + { + "name":"NSIsModRequiredOnClient", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, + { + "name":"NSGetModConvarsByModName", + "helpText":"", + "returnTypeString":"array<string>", + "argTypes":"string modName" + }, + { + "name":"DecodeJSON", + "helpText":"converts a json string to a squirrel table", + "returnTypeString":"table", + "argTypes":"string json, bool fatalParseErrors = false" + }, + { + "name":"EncodeJSON", + "helpText":"converts a squirrel table to a json string", + "returnTypeString":"string", + "argTypes":"table data" + }, + { + "name":"StringToAsset", + "helpText":"converts a given string to an asset", + "returnTypeString":"asset", + "argTypes":"string assetName" + }, + { + "name":"NSGetLocalPlayerUID", + "helpText":"Returns the local player's uid.", + "returnTypeString":"string", + "argTypes":"" + }, + { + "name":"NSGetCurrentModName", + "helpText":"Returns the mod name of the script running this function", + "returnTypeString":"string", + "argTypes":"" + }, + { + "name":"NSGetCallingModName", + "helpText":"Returns the mod name of the script running this function", + "returnTypeString":"string", + "argTypes":"int depth = 0" + }, + { + "name":"NSUpdateGameStateClient", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int playerCount, int maxPlayers, int outScore, int secondHighestScore, int highestScore, bool roundBased, int scoreLimit" + }, + { + "name":"NSUpdateServerInfoReload", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int maxPlayers" + }, + { + "name":"NSUpdateTimeInfo", + "helpText":"", + "returnTypeString":"void", + "argTypes":"float timeInFuture" + }, + { + "name":"NS_InternalMakeHttpRequest", + "helpText":"[Internal use only] Passes the HttpRequest struct fields to be reconstructed in native and used for an http request", + "returnTypeString":"int", + "argTypes":"int method, string baseUrl, table<string, array<string> > headers, table<string, array<string> > queryParams, string contentType, string body, int timeout, string userAgent" + }, + { + "name":"NSIsHttpEnabled", + "helpText":"Whether or not HTTP requests are enabled. You can opt-out by starting the game with -disablehttprequests.", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSIsLocalHttpAllowed", + "helpText":"Whether or not HTTP requests can be made to a private network address. You can enable this by starting the game with -allowlocalhttp.", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NS_InternalLoadFile", + "helpText":"Loads a file asynchronously.", + "returnTypeString":"int", + "argTypes":"string file" + }, + { + "name":"NSSaveFile", + "helpText":"Saves a file.", + "returnTypeString":"void", + "argTypes":"string file, string data" + }, + { + "name":"NSSaveJSONFile", + "helpText":"Converts a squirrel table to a json string, then saves it to a file.", + "returnTypeString":"void", + "argTypes":"string file, table data" + }, + { + "name":"NSDoesFileExist", + "helpText":"Checks whether or not a file exists.", + "returnTypeString":"bool", + "argTypes":"string file" + }, + { + "name":"NSDeleteFile", + "helpText":"Deletes a file.", + "returnTypeString":"bool", + "argTypes":"string file" + }, + { + "name":"NS_InternalGetAllFiles", + "helpText":"Returns an array of all files in a mod's save folder.", + "returnTypeString":"array<string>", + "argTypes":"string path" + }, + { + "name":"NSGetFileSize", + "helpText":"Returns the size of a file, in KB, rounded down.", + "returnTypeString":"int", + "argTypes":"string file" + }, + { + "name":"NSIsFolder", + "helpText":"Returns whether or not a given path leads to a folder.", + "returnTypeString":"bool", + "argTypes":"string path" + } + ], + "UI":[ + { + "name":"NSGetCursorPosition", + "helpText":"", + "returnTypeString":"vector ornull", + "argTypes":"" + }, + { + "name":"NSRequestCustomMainMenuPromos", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NSHasCustomMainMenuPromoData", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSGetCustomMainMenuPromoData", + "helpText":"", + "returnTypeString":"var", + "argTypes":"int promoDataKey" + }, + { + "name":"NSGetModNames", + "helpText":"", + "returnTypeString":"array<string>", + "argTypes":"" + }, + { + "name":"NSIsModEnabled", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, + { + "name":"NSSetModEnabled", + "helpText":"", + "returnTypeString":"void", + "argTypes":"string modName, bool enabled" + }, + { + "name":"NSGetModDescriptionByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModVersionByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModDownloadLinkByModName", + "helpText":"", + "returnTypeString":"string", + "argTypes":"string modName" + }, + { + "name":"NSGetModLoadPriority", + "helpText":"", + "returnTypeString":"int", + "argTypes":"string modName" + }, + { + "name":"NSIsModRequiredOnClient", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, + { + "name":"NSGetModConvarsByModName", + "helpText":"", + "returnTypeString":"array<string>", + "argTypes":"string modName" + }, + { + "name": "NSFetchVerifiedModsManifesto", + "helpText": "Retrieves the verified mods list from the central authority (GitHub).", + "returnTypeString": "void", + "argTypes": "" + + }, + { + "name": "NSIsModDownloadable", + "helpText": "checks whether a mod is verified and can be auto-downloaded", + "returnTypeString": "bool", + "argTypes": "string name, string version" + + }, + { + "name": "NSDownloadMod", + "helpText": "downloads a given mod from distant API to local game profile", + "returnTypeString": "void", + "argTypes": "string name, string version" + }, + { + "name": "NSGetModInstallState", + "helpText": "get status of the mod currently being installed", + "returnTypeString": "ModInstallState", + "argTypes": "" + }, + { + "name":"NSReloadMods", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NSIsMasterServerAuthenticated", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSRequestServerList", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NSIsRequestingServerList", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSMasterServerConnectionSuccessful", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSGetServerCount", + "helpText":"", + "returnTypeString":"int", + "argTypes":"" + }, + { + "name": "NSGetGameServers", + "helpText": "Gets all fetched servers", + "returnTypeString": "array<ServerInfo>", + "argTypes": "" + }, + { + "name":"NSClearRecievedServerList", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NSTryAuthWithServer", + "helpText":"", + "returnTypeString":"void", + "argTypes":"int serverIndex, string password = ''" + }, + { + "name":"NSIsAuthenticatingWithServer", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSWasAuthSuccessful", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSConnectToAuthedServer", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NSTryAuthWithLocalServer", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NSCompleteAuthWithLocalServer", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NSGetAuthFailReason", + "helpText":"", + "returnTypeString":"string", + "argTypes":"" + }, + { + "name":"DecodeJSON", + "helpText":"converts a json string to a squirrel table", + "returnTypeString":"table", + "argTypes":"string json, bool fatalParseErrors = false" + }, + { + "name":"EncodeJSON", + "helpText":"converts a squirrel table to a json string", + "returnTypeString":"string", + "argTypes":"table data" + }, + { + "name":"StringToAsset", + "helpText":"converts a given string to an asset", + "returnTypeString":"asset", + "argTypes":"string assetName" + }, + { + "name":"NSGetLocalPlayerUID", + "helpText":"Returns the local player's uid.", + "returnTypeString":"string", + "argTypes":"" + }, + { + "name":"NSGetCurrentModName", + "helpText":"Returns the mod name of the script running this function", + "returnTypeString":"string", + "argTypes":"" + }, + { + "name":"NSGetCallingModName", + "helpText":"Returns the mod name of the script running this function", + "returnTypeString":"string", + "argTypes":"int depth = 0" + }, + { + "name":"NSUpdateGameStateUI", + "helpText":"", + "returnTypeString":"void", + "argTypes":"string gamemode, string gamemodeName, string map, string mapName, bool connected, bool loading" + }, + { + "name":"NSUpdateServerInfo", + "helpText":"", + "returnTypeString":"void", + "argTypes":"string id, string name, string password, int players, int maxPlayers, string map, string mapDisplayName, string playlist, string playlistDisplayName" + }, + { + "name":"NSSetLoading", + "helpText":"", + "returnTypeString":"void", + "argTypes":"bool loading" + }, + { + "name":"NSUpdateListenServer", + "helpText":"", + "returnTypeString":"void", + "argTypes":"" + }, + { + "name":"NS_InternalMakeHttpRequest", + "helpText":"[Internal use only] Passes the HttpRequest struct fields to be reconstructed in native and used for an http request", + "returnTypeString":"int", + "argTypes":"int method, string baseUrl, table<string, array<string> > headers, table<string, array<string> > queryParams, string contentType, string body, int timeout, string userAgent" + }, + { + "name":"NSIsHttpEnabled", + "helpText":"Whether or not HTTP requests are enabled. You can opt-out by starting the game with -disablehttprequests.", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NSIsLocalHttpAllowed", + "helpText":"Whether or not HTTP requests can be made to a private network address. You can enable this by starting the game with -allowlocalhttp.", + "returnTypeString":"bool", + "argTypes":"" + }, + { + "name":"NS_InternalLoadFile", + "helpText":"Loads a file asynchronously.", + "returnTypeString":"int", + "argTypes":"string file" + }, + { + "name":"NSSaveFile", + "helpText":"Saves a file.", + "returnTypeString":"void", + "argTypes":"string file, string data" + }, + { + "name":"NSSaveJSONFile", + "helpText":"Converts a squirrel table to a json string, then saves it to a file.", + "returnTypeString":"void", + "argTypes":"string file, table data" + }, + { + "name":"NSDoesFileExist", + "helpText":"Checks whether or not a file exists.", + "returnTypeString":"bool", + "argTypes":"string file" + }, + { + "name":"NSDeleteFile", + "helpText":"Deletes a file.", + "returnTypeString":"bool", + "argTypes":"string file" + }, + { + "name":"NS_InternalGetAllFiles", + "helpText":"Returns an array of all files in a mod's save folder.", + "returnTypeString":"array<string>", + "argTypes":"string path" + }, + { + "name":"NSGetFileSize", + "helpText":"Returns the size of a file, in KB, rounded down.", + "returnTypeString":"int", + "argTypes":"string file" + }, + { + "name":"NSIsFolder", + "helpText":"Returns whether or not a given path leads to a folder.", + "returnTypeString":"bool", + "argTypes":"string path" + }, + { + "name":"NSGetMasterServerAuthResult", + "helpText":"", + "returnTypeString":"MasterServerAuthResult", + "argTypes":"" + } + ] +}
\ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 871b946e..8cda06a3 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,6 +3,9 @@ WHEN OPENING A PULL REQUEST KEEP IN MIND: -> If the changes you made can be summarised in a screenshot, add one (e.g. you changed the layout of an in-game menu) -> If the changes you made can be summarised in a screenrecording, add one (e.g. proof that you fixed a certain bug) +-> For fixes, description on how to reproduce the bug are appreciated and help your PR get merged faster +-> For features, description on how to use or a sample mod that makes use of the feature is appreciated and will help your PR get merged faster + -> Please use a sensible title for your pull request -> Please describe the changes you made. The easier it is to understand what you changed, the higher the chances of your PR being merged (in a timely manner). diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 00000000..773a52b8 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,19 @@ +name: add-to-project + +on: + issues: + types: + - opened + pull_request_target: + types: + - opened + +jobs: + add-to-project: + name: Add to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + project-url: "https://github.com/orgs/R2Northstar/projects/3" + github-token: "${{ secrets.ADD_TO_PROJECT_PAT }}" diff --git a/.github/workflows/compile-check.yml b/.github/workflows/compile-check.yml new file mode 100644 index 00000000..cb7ab1d0 --- /dev/null +++ b/.github/workflows/compile-check.yml @@ -0,0 +1,30 @@ +# This action checks whether all Squirrel files compile successfully using standalone Squirrel compiler +name: compile-check + +on: [push, pull_request] + +jobs: + compile: + runs-on: windows-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + path: "mods" + + - name: Compile Scripts + uses: ASpoonPlaysGames/squirrel-re-compiler@v3 + with: + mods-directory: "${{ github.workspace }}/mods" + native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json" + + # It's important that scripts compile when Northstar.Custom isn't enabled/installed, so run again without it + - name: Remove Northstar.Custom + run: rmdir ${{ github.workspace }}\mods\Northstar.Custom /s /q + shell: cmd + + - name: Compile Scripts (No Northstar.Custom) + uses: ASpoonPlaysGames/squirrel-re-compiler@v3 + with: + mods-directory: "${{ github.workspace }}/mods" + native-json: "${{ github.workspace }}/mods/.github/nativefuncs.json" diff --git a/.github/workflows/encoding.yml b/.github/workflows/encoding.yml index 0b54639e..5a730c20 100644 --- a/.github/workflows/encoding.yml +++ b/.github/workflows/encoding.yml @@ -3,11 +3,19 @@ on: [push, pull_request] jobs: check-loc-encoding: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check localization files encoding run: | - files=$(ls Northstar.Client/mod/resource/*.txt) + files=$(ls Northstar.Client/mod/resource/northstar_client_localisation_*.txt) IFS=$'\n'; files=($files); unset IFS; ! file --mime "${files[@]}" | grep -v "charset=utf-16le" + check-missing-translations: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Look out for missing translations + run: node .github/build/find-missing-translations.js + continue-on-error: true diff --git a/.github/workflows/merge-conflict-auto-label.yml b/.github/workflows/merge-conflict-auto-label.yml new file mode 100644 index 00000000..abb7cabd --- /dev/null +++ b/.github/workflows/merge-conflict-auto-label.yml @@ -0,0 +1,19 @@ +name: Merge Conflict Auto Label +on: + workflow_dispatch: # Manual run + push: + branches: + - main + schedule: + - cron: "10 21 * * *" # Runs at 21:10; time was chosen based on contributor activity and low GitHub Actions cron load. + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: mschilde/auto-label-merge-conflicts@master + with: + CONFLICT_LABEL_NAME: "merge conflicts" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAX_RETRIES: 5 + WAIT_MS: 5000 |