From eb73151377746b07de65310774ab81cc1bee7c02 Mon Sep 17 00:00:00 2001 From: Gebacken Sonnig <110278648+lilsunny243@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:57:21 +0200 Subject: [PATCH 1/3] Improvements --- .vscode/c_cpp_properties.json | 18 +++++++++ .vscode/launch.json | 21 +++++++++++ .vscode/settings.json | 70 +++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..980fd575 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "macos-clang-arm64", + "includePath": [ + "${workspaceFolder}/**" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "macos-clang-arm64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..d86d332f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug", + "program": "${workspaceFolder}/", + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "name": "C/C++ Runner: Debug Session", + "type": "lldb", + "request": "launch", + "args": [], + "cwd": "/Users/lillinakrug/Documents/GitHub/CocoaHTTPServer/Samples/Xcode-Configurations", + "program": "/Users/lillinakrug/Documents/GitHub/CocoaHTTPServer/Samples/Xcode-Configurations/build/Debug/outDebug" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..4840f9f9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,70 @@ +{ + "C_Cpp_Runner.cCompilerPath": "clang", + "C_Cpp_Runner.cppCompilerPath": "clang++", + "C_Cpp_Runner.debuggerPath": "lldb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false, + "python.testing.unittestArgs": [ + "-v", + "-s", + "./Vendor", + "-p", + "*test.py" + ], + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false, + "python.testing.pytestArgs": [ + "Extensions" + ] +} \ No newline at end of file From 10fbb3bf6e2564ae25b5b1865adcda5d2fc32620 Mon Sep 17 00:00:00 2001 From: ImgBotApp Date: Mon, 17 Jul 2023 21:29:31 +0000 Subject: [PATCH 2/3] [ImgBot] Optimize images /Samples/iPhoneHTTPServer/Default-568h@2x.png -- 18.16kb -> 5.24kb (71.13%) Signed-off-by: ImgBotApp --- Samples/iPhoneHTTPServer/Default-568h@2x.png | Bin 18594 -> 5369 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Samples/iPhoneHTTPServer/Default-568h@2x.png b/Samples/iPhoneHTTPServer/Default-568h@2x.png index 0891b7aabfcf3422423b109c8beed2bab838c607..805f77ff9f27f3ce911af0d63caa2fa9665fb6c2 100644 GIT binary patch literal 5369 zcmeHLdpK0<9$queFm8p|N-jgWwWArvJ>@bQPMd7WbrZ&58qDmO5i^n*(H6Nx$sUD@ z?6#0gsLi+?OmfRDg%8H9U}VW-?4+qcM2)7Mhw%>gbphAI){(3{%N@{ z-)AO#U$U~U{qn4aWTU}i-S?B;E{J%U+>J{YdWK_C#4SoE`igS`nkc|#eThZh9H*5j zd45e`^i$eluD;T%JqJn;`<+ru9fD0gymnM#9dhDQt=>l~_kxw-OH%vOO0Y+s6j3k& zR6W^s^h1jI813epJ=GkF(GH0tT@qupHVs;@toO3U_k3_sm=Hsa?6~#VKmj8ao#Wm1 zOc~^btgA<)CAmZDT~;$*z2+A7Ow!gu+7st654apf)!xNqug{IlGSGzaI;lGQjYd&* zLg9B4#@-4Hws9>t`?jfp)o!ax$~|mkSIoJQq1jt9Ot2SQeL<<|wB(?)U{VSbQ*2sa zM|B4l4`v*EE7Ne{eeqML_(8{{Cv7pLa6cuLco}p%DnDJpQ?^Z|L8gBwD#@~n zQAy=0cS91i4Op0*`D+gZ@ODJj2k6yqk!xBk4XbCV)F{jO%TDoUC0z@CMk5LKVYud6 z`FzIZmd~R>fOKniM%q{~rZlhh`Wfbnrhb)BK}ySp&b7JbKnJ`rIcCe0yX=-WV8*7|RdN)*&wU*j_1OFr? zQQk7w$$VrE66FSh^*Y^TQ2o4@V4dzM#9^C(_oyTI7xS5%xk?X1x^VQlS5M>D*ewXe z{2!c(`m)&|8w~?vx3Qlh1IcCba|)cvi2eQA1wS7bMUE~8Efi-BHHqBFZ+$NSv~uJB zI6rp3MP5_Qw$5bN$u`aogJf`g;PgbjUG==p%e9mNWGh>8p}`a=WF+^)78+i?cu8qc*ZRsbDDI&S1v z(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)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u From 038974826c0e7d6d0a2d1ac20163e5f1ef3e8bbf Mon Sep 17 00:00:00 2001 From: Gebacken Sonnig <110278648+lilsunny243@users.noreply.github.com> Date: Wed, 18 Oct 2023 00:44:56 +0200 Subject: [PATCH 3/3] Create auto-close-pr.yml --- .github/workflows/auto-close-pr.yml | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/auto-close-pr.yml diff --git a/.github/workflows/auto-close-pr.yml b/.github/workflows/auto-close-pr.yml new file mode 100644 index 00000000..974b835e --- /dev/null +++ b/.github/workflows/auto-close-pr.yml @@ -0,0 +1,55 @@ +name: Auto Close PRs + +on: + pull_request_target: + types: [opened, reopened] + +jobs: + check_pr: + name: Check PR + runs-on: ubuntu-latest + + steps: + - name: Check if employee + id: check_employee + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.READ_GITHUB_ORG_MEMBERS_TOKEN }} + result-encoding: string + script: | + try { + const response = await github.rest.orgs.checkMembershipForUser({ + org: `github`, + username: context.payload.pull_request.user.login + }); + + if (response.status === 204) { + return true; + } else { + return false; + } + } catch (error) { + console.log(error); + return 'false'; + } + + - name: Close PR + id: close_pr + if: ${{ steps.check_employee.outputs.result == 'false' }} + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const body = `This pull request is being automatically closed because we do not accept external contributions to this repository.`; + + await github.rest.issues.createComment({ + ...context.repo, + issue_number: context.issue.number, + body: body + }); + + await github.rest.pulls.update({ + ...context.repo, + pull_number: context.payload.pull_request.number, + state: 'closed' + });