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' + }); 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 diff --git a/Samples/iPhoneHTTPServer/Default-568h@2x.png b/Samples/iPhoneHTTPServer/Default-568h@2x.png index 0891b7aa..805f77ff 100644 Binary files a/Samples/iPhoneHTTPServer/Default-568h@2x.png and b/Samples/iPhoneHTTPServer/Default-568h@2x.png differ