From dc1c82ef160e6fc6f360f4dfa3cb0d2ad5f0aee3 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 18 Mar 2023 23:02:27 +0800 Subject: [PATCH 01/20] .git-blame-ignore-revs: update --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 166746c09..4ffa70a2f 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,3 +1,6 @@ +# *.fsx,*.fs: formatting F# files using fantomless +df5cfb143c4efe73806ead91e5cddf4e133be0a8 + # commitlint.config: split helper funcs and plugins 3008d6578aa484ae776b29c9246dca4eeae3418a From 170a2213ac460c8c3e5651faabc8ca7164c57f84 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 12:56:19 +0330 Subject: [PATCH 02/20] wip1 --- .github/workflows/CI.yml | 138 +------------------------- scripts/detectNotUsingGitPush1by1.fsx | 1 + 2 files changed, 3 insertions(+), 136 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 28af6800c..f623c3230 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,99 +3,8 @@ name: CI on: [push, pull_request] jobs: - build: - name: Build - runs-on: ubuntu-22.04 - container: - image: "ubuntu:22.04" - steps: - - uses: actions/checkout@v2 - - name: Install required dependencies - run: | - apt update - apt install -y sudo - sudo apt install -y git - # workaround for https://github.com/actions/runner/issues/2033 - - name: ownership workaround - run: git config --global --add safe.directory '*' - - name: Install dotnet sdk - run: sudo apt install -y dotnet6 - - name: Compile the conventions solution - run: dotnet build --configuration Release conventions.sln - - name: Compile F# scripts - run: dotnet fsi scripts/compileFSharpScripts.fsx - - file-conventions-tests: - name: Run FileConventions-lib unit tests - needs: build - runs-on: ubuntu-22.04 - container: - image: "ubuntu:22.04" - steps: - - uses: actions/checkout@v2 - - name: Install required dependencies - run: | - apt update - apt install --yes sudo - - # We need to install curl otherwise we get these errors in the CI: - # Unable to load the service index for source https://api.nuget.org/v3/index.json. - # The SSL connection could not be established, see inner exception. - # The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot - sudo apt install --yes curl - - - name: Setup .NET - run: apt install -y dotnet6 - - name: Run tests to validate F# scripts - run: dotnet test src/FileConventions.Test/FileConventions.Test.fsproj - - commitlint-plugins-tests: - name: Run commitlint-related tests - needs: build - runs-on: ubuntu-22.04 - container: - image: "ubuntu:22.04" - steps: - - uses: actions/checkout@v2 - - name: Install required dependencies - run: | - apt update - apt install --yes sudo - sudo apt install --yes git - - sudo apt install --yes curl - # can't install ubuntu's default nodejs version because we would get this error: - # error @jest/core@29.4.1: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.9" - curl --show-error --location https://deb.nodesource.com/setup_14.x | sudo --preserve-env bash - - sudo DEBIAN_FRONTEND=noninteractive apt install --yes nodejs - - name: Print versions - run: | - git --version - node --version - npm --version - npx commitlint --version - - name: Install yarn - run: | - npm install --global yarn - yarn add --dev jest typescript ts-jest @types/jest - - name: Install commitlint - run: | - npm install conventional-changelog-conventionalcommits - npm install commitlint@latest - - name: Print versions - run: | - git --version - node --version - npm --version - npx commitlint --version - - name: Run tests to validate our plugins - run: yarn jest - sanity-check: name: Sanity check - needs: - - file-conventions-tests - - commitlint-plugins-tests runs-on: ubuntu-22.04 container: image: "ubuntu:22.04" @@ -105,6 +14,8 @@ jobs: apt update && apt install --yes sudo sudo apt install --yes git sudo DEBIAN_FRONTEND=noninteractive apt install --yes npm + - name: Install dotnet sdk + run: sudo apt install -y dotnet6 - uses: actions/checkout@v2 with: submodules: recursive @@ -113,57 +24,12 @@ jobs: # workaround for https://github.com/actions/runner/issues/2033 - name: ownership workaround run: git config --global --add safe.directory '*' - - name: Print versions - run: | - git --version - node --version - npm --version - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: ./commitlint.sh --from HEAD~1 --to HEAD --verbose - - name: Validate PR commits with commitlint - if: github.event_name == 'pull_request' - run: | - ./commitlint.sh --verbose \ - --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \ - --to ${{ github.event.pull_request.head.sha }} - - name: Install dotnet sdk - run: sudo apt install --yes dotnet6 - - name: Check all files end with EOL - run: dotnet fsi scripts/eofConvention.fsx - - name: Check all .fsx scripts have shebang - run: dotnet fsi scripts/shebangConvention.fsx - - name: Check there are no mixed line-endings in any files - run: dotnet fsi scripts/mixedLineEndings.fsx - - name: Check there are no unpinned GitHubActions image versions - run: dotnet fsi scripts/unpinnedGitHubActionsImageVersions.fsx - - name: Check there are no unpinned dotnet package versions - run: dotnet fsi scripts/unpinnedDotnetPackageVersions.fsx - - name: Check there are no unpinned nuget package reference versions in F# scripts - run: dotnet fsi scripts/unpinnedNugetPackageReferenceVersions.fsx - name: Check if gitPush1by1 was used if: github.event_name == 'pull_request' run: dotnet fsi scripts/detectNotUsingGitPush1by1.fsx - - name: Install prettier - run: npm install prettier@2.8.3 - - name: Change file permissions - # We need this step so we can change the files using `npx prettier --write` in the next step. - # Otherwise we get permission denied error in the CI. - run: sudo chmod 777 -R . - - name: Run "prettier" to check the style of our TypeScript code - run: | - sudo npx prettier --quote-props=consistent --write './**/*.ts' - # Since we changed file modes in the previous step we need the following command to - # make git ignore mode changes in files and doesn't include them in the git diff command. - git config core.fileMode false - # Since after installing commitlint dependencies package.json file changes, we need to - # run the following command to ignore package.json file - git restore package.json - git diff --exit-code - name: fantomless run: | dotnet new tool-manifest dotnet tool install fantomless-tool --version 4.7.997-prerelease dotnet fantomless --recurse . git diff --exit-code - diff --git a/scripts/detectNotUsingGitPush1by1.fsx b/scripts/detectNotUsingGitPush1by1.fsx index 02196d9fd..2965e1e9e 100644 --- a/scripts/detectNotUsingGitPush1by1.fsx +++ b/scripts/detectNotUsingGitPush1by1.fsx @@ -63,6 +63,7 @@ let notUsingGitPush1by1 = commit let json = (client.GetStringAsync url).Result + printfn "json: %A" json json.Contains "\"check_suites\":[]" ) From 2aacb84cb5a97baa505dcce38807fd27698ef659 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 12:53:29 +0330 Subject: [PATCH 03/20] wip2 --- scripts/detectNotUsingGitPush1by1.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/detectNotUsingGitPush1by1.fsx b/scripts/detectNotUsingGitPush1by1.fsx index 2965e1e9e..9679db5d0 100644 --- a/scripts/detectNotUsingGitPush1by1.fsx +++ b/scripts/detectNotUsingGitPush1by1.fsx @@ -77,4 +77,4 @@ if notUsingGitPush1by1 then "https://github.com/nblockchain/conventions/blob/master/scripts/gitPush1by1.fsx" Console.Error.WriteLine errMsg - Environment.Exit 1 + Environment.Exit 1 \ No newline at end of file From affc379a8806d2795ddceacdbdce3847eeeeff7b Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 12:53:46 +0330 Subject: [PATCH 04/20] wip3 --- scripts/detectNotUsingGitPush1by1.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/detectNotUsingGitPush1by1.fsx b/scripts/detectNotUsingGitPush1by1.fsx index 9679db5d0..2965e1e9e 100644 --- a/scripts/detectNotUsingGitPush1by1.fsx +++ b/scripts/detectNotUsingGitPush1by1.fsx @@ -77,4 +77,4 @@ if notUsingGitPush1by1 then "https://github.com/nblockchain/conventions/blob/master/scripts/gitPush1by1.fsx" Console.Error.WriteLine errMsg - Environment.Exit 1 \ No newline at end of file + Environment.Exit 1 From b20b3aaec8055918a7b5a04814cb88e76a3b9ccc Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 13:27:17 +0330 Subject: [PATCH 05/20] wip4 --- .github/workflows/CI.yml | 3 + scripts/checkSuitsType.json | 377 ++++++++++++++++++++++++++++++++ scripts/sample.json | 421 ++++++++++++++++++++++++++++++++++++ test10.fsx | 9 + 4 files changed, 810 insertions(+) create mode 100644 scripts/checkSuitsType.json create mode 100644 scripts/sample.json create mode 100644 test10.fsx diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f623c3230..a10888e78 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,6 +27,9 @@ jobs: - name: Check if gitPush1by1 was used if: github.event_name == 'pull_request' run: dotnet fsi scripts/detectNotUsingGitPush1by1.fsx + - name: Run test 10 + if: github.event_name == 'pull_request' + run: dotnet fsi test10.fsx - name: fantomless run: | dotnet new tool-manifest diff --git a/scripts/checkSuitsType.json b/scripts/checkSuitsType.json new file mode 100644 index 000000000..09c1f9dae --- /dev/null +++ b/scripts/checkSuitsType.json @@ -0,0 +1,377 @@ +{ + "total_count": 2, + "check_suites": [ + { + "id": 11157990057, + "node_id": "CS_kwDOIMpMhM8AAAACmRFqqQ", + "head_branch": "fSharpScriptsWithoutShebang-squashed2", + "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", + "status": "completed", + "conclusion": "success", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057", + "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", + "after": "86140764e7f95649a70f117067146d4a6b7c8201", + "pull_requests": [ + + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-02-23T12:10:48Z", + "updated_at": "2023-02-23T12:16:40Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 3, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057/check-runs", + "head_commit": { + "id": "86140764e7f95649a70f117067146d4a6b7c8201", + "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", + "message": "FileConventions: add HasCorrectShebang function", + "timestamp": "2023-02-23T12:02:15Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + }, + { + "id": 11158210887, + "node_id": "CS_kwDOIMpMhM8AAAACmRTJRw", + "head_branch": "fSharpScriptsWithoutShebang-squashed2", + "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", + "status": "completed", + "conclusion": "success", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887", + "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", + "after": "86140764e7f95649a70f117067146d4a6b7c8201", + "pull_requests": [ + + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-02-23T12:21:33Z", + "updated_at": "2023-02-23T12:26:13Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 3, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887/check-runs", + "head_commit": { + "id": "86140764e7f95649a70f117067146d4a6b7c8201", + "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", + "message": "FileConventions: add HasCorrectShebang function", + "timestamp": "2023-02-23T12:02:15Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + } + ] +} diff --git a/scripts/sample.json b/scripts/sample.json new file mode 100644 index 000000000..0a82f2e1f --- /dev/null +++ b/scripts/sample.json @@ -0,0 +1,421 @@ +{ + "total_count": 2, + "check_suites": [ + { + "id": 11828548311, + "node_id": "CS_kwDOIMpMhM8AAAACwQlS1w", + "head_branch": "improveGitPush1by1Check", + "head_sha": "2aacb84cb5a97baa505dcce38807fd27698ef659", + "status": "completed", + "conclusion": "failure", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11828548311", + "before": "170a2213ac460c8c3e5651faabc8ca7164c57f84", + "after": "2aacb84cb5a97baa505dcce38807fd27698ef659", + "pull_requests": [ + { + "url": "https://api.github.com/repos/realmarv/conventions/pulls/5", + "id": 1290287503, + "number": 5, + "head": { + "ref": "improveGitPush1by1Check", + "sha": "affc379a8806d2795ddceacdbdce3847eeeeff7b", + "repo": { + "id": 550128772, + "url": "https://api.github.com/repos/realmarv/conventions", + "name": "conventions" + } + }, + "base": { + "ref": "master", + "sha": "0be2f2d608cdf893e146db1296dee750a2a54cfc", + "repo": { + "id": 550128772, + "url": "https://api.github.com/repos/realmarv/conventions", + "name": "conventions" + } + } + } + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-03-27T09:35:45Z", + "updated_at": "2023-03-27T09:37:34Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 1, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11828548311/check-runs", + "head_commit": { + "id": "2aacb84cb5a97baa505dcce38807fd27698ef659", + "tree_id": "ed82c4dcfc4f6a1acebc9ae6ec113ca7b9b6c25b", + "message": "wip2", + "timestamp": "2023-03-27T09:34:51Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + }, + { + "id": 11828549444, + "node_id": "CS_kwDOIMpMhM8AAAACwQlXRA", + "head_branch": "improveGitPush1by1Check", + "head_sha": "2aacb84cb5a97baa505dcce38807fd27698ef659", + "status": "completed", + "conclusion": "failure", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11828549444", + "before": "170a2213ac460c8c3e5651faabc8ca7164c57f84", + "after": "2aacb84cb5a97baa505dcce38807fd27698ef659", + "pull_requests": [ + { + "url": "https://api.github.com/repos/realmarv/conventions/pulls/5", + "id": 1290287503, + "number": 5, + "head": { + "ref": "improveGitPush1by1Check", + "sha": "affc379a8806d2795ddceacdbdce3847eeeeff7b", + "repo": { + "id": 550128772, + "url": "https://api.github.com/repos/realmarv/conventions", + "name": "conventions" + } + }, + "base": { + "ref": "master", + "sha": "0be2f2d608cdf893e146db1296dee750a2a54cfc", + "repo": { + "id": 550128772, + "url": "https://api.github.com/repos/realmarv/conventions", + "name": "conventions" + } + } + } + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-03-27T09:35:48Z", + "updated_at": "2023-03-27T09:37:18Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 1, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11828549444/check-runs", + "head_commit": { + "id": "2aacb84cb5a97baa505dcce38807fd27698ef659", + "tree_id": "ed82c4dcfc4f6a1acebc9ae6ec113ca7b9b6c25b", + "message": "wip2", + "timestamp": "2023-03-27T09:34:51Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + } + ] +} diff --git a/test10.fsx b/test10.fsx new file mode 100644 index 000000000..44adbc8f1 --- /dev/null +++ b/test10.fsx @@ -0,0 +1,9 @@ +open System.IO +#r "nuget: FSharp.Data, Version=5.0.2" +open FSharp.Data + +type Simple = JsonProvider<"scripts/checkSuitsType.json"> + +let value = Simple.Parse(File.ReadAllText "scripts/sample.json") + +printfn "value: %A" value From db1ca34539929d2c63b2211c9e296dfd238d95d6 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 13:39:08 +0330 Subject: [PATCH 06/20] wip5 --- test10.fsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test10.fsx b/test10.fsx index 44adbc8f1..5c1e458a7 100644 --- a/test10.fsx +++ b/test10.fsx @@ -2,8 +2,10 @@ open System.IO #r "nuget: FSharp.Data, Version=5.0.2" open FSharp.Data -type Simple = JsonProvider<"scripts/checkSuitsType.json"> +let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") +type Simple = JsonProvider -let value = Simple.Parse(File.ReadAllText "scripts/sample.json") +let sample = File.ReadAllText("scripts/sample.json") +let value = Simple.Parse(sample) printfn "value: %A" value From be01afb64b4251aa575300f0a2116d607a37ea33 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 13:44:09 +0330 Subject: [PATCH 07/20] wip6 --- test10.fsx | 384 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 382 insertions(+), 2 deletions(-) diff --git a/test10.fsx b/test10.fsx index 5c1e458a7..ab1c1ffa5 100644 --- a/test10.fsx +++ b/test10.fsx @@ -3,9 +3,389 @@ open System.IO open FSharp.Data let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") -type Simple = JsonProvider + +type Simple = + JsonProvider<""" +{ + "total_count": 2, + "check_suites": [ + { + "id": 11157990057, + "node_id": "CS_kwDOIMpMhM8AAAACmRFqqQ", + "head_branch": "fSharpScriptsWithoutShebang-squashed2", + "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", + "status": "completed", + "conclusion": "success", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057", + "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", + "after": "86140764e7f95649a70f117067146d4a6b7c8201", + "pull_requests": [ + + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-02-23T12:10:48Z", + "updated_at": "2023-02-23T12:16:40Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 3, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057/check-runs", + "head_commit": { + "id": "86140764e7f95649a70f117067146d4a6b7c8201", + "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", + "message": "FileConventions: add HasCorrectShebang function", + "timestamp": "2023-02-23T12:02:15Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + }, + { + "id": 11158210887, + "node_id": "CS_kwDOIMpMhM8AAAACmRTJRw", + "head_branch": "fSharpScriptsWithoutShebang-squashed2", + "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", + "status": "completed", + "conclusion": "success", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887", + "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", + "after": "86140764e7f95649a70f117067146d4a6b7c8201", + "pull_requests": [ + + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-02-23T12:21:33Z", + "updated_at": "2023-02-23T12:26:13Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 3, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887/check-runs", + "head_commit": { + "id": "86140764e7f95649a70f117067146d4a6b7c8201", + "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", + "message": "FileConventions: add HasCorrectShebang function", + "timestamp": "2023-02-23T12:02:15Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + } + ] +} +"""> let sample = File.ReadAllText("scripts/sample.json") -let value = Simple.Parse(sample) +let value = Simple.Parse sample printfn "value: %A" value From 5c54c7b42d992850aeb79eb73f7c74191c7cb260 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 13:51:55 +0330 Subject: [PATCH 08/20] wip7 --- test10.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index ab1c1ffa5..ee046c435 100644 --- a/test10.fsx +++ b/test10.fsx @@ -388,4 +388,4 @@ type Simple = let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample -printfn "value: %A" value +printfn "value: %A" (Some value.CheckSuites) From 78650e6c38d4496745fe04e062e81c6510a19eb6 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 13:55:20 +0330 Subject: [PATCH 09/20] wip8 --- test10.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index ee046c435..b15502a20 100644 --- a/test10.fsx +++ b/test10.fsx @@ -388,4 +388,4 @@ type Simple = let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample -printfn "value: %A" (Some value.CheckSuites) +printfn "value: %A" (Some value.CheckSuites.[0]) From 400d36b452a3d7019476b0fd16b076eb143129f5 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:00:37 +0330 Subject: [PATCH 10/20] wip9 --- test10.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index b15502a20..a68bddaec 100644 --- a/test10.fsx +++ b/test10.fsx @@ -388,4 +388,4 @@ type Simple = let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample -printfn "value: %A" (Some value.CheckSuites.[0]) +printfn "value: %A" (Some value.CheckSuites.[0].Repository.FullName) From 474f6a8330a5bacf2db95cb9d13dfc145dd85624 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:03:07 +0330 Subject: [PATCH 11/20] wip10 --- test10.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index a68bddaec..f7aa3da70 100644 --- a/test10.fsx +++ b/test10.fsx @@ -388,4 +388,4 @@ type Simple = let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample -printfn "value: %A" (Some value.CheckSuites.[0].Repository.FullName) +printfn "value: %A" (value.CheckSuites.[0].Repository.FullName) From 3e03783e21e3e7a95c15e3bbaffeaeec5d6241f0 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:03:31 +0330 Subject: [PATCH 12/20] wip11 --- test10.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index f7aa3da70..24181131e 100644 --- a/test10.fsx +++ b/test10.fsx @@ -388,4 +388,4 @@ type Simple = let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample -printfn "value: %A" (value.CheckSuites.[0].Repository.FullName) +printfn "value: %A" value.CheckSuites.[0].Repository.FullName From 991931bbb986f54916efc2884d3c676a8c1276fb Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:07:19 +0330 Subject: [PATCH 13/20] wip12 --- test10.fsx | 381 +---------------------------------------------------- 1 file changed, 1 insertion(+), 380 deletions(-) diff --git a/test10.fsx b/test10.fsx index 24181131e..c83801072 100644 --- a/test10.fsx +++ b/test10.fsx @@ -4,386 +4,7 @@ open FSharp.Data let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") -type Simple = - JsonProvider<""" -{ - "total_count": 2, - "check_suites": [ - { - "id": 11157990057, - "node_id": "CS_kwDOIMpMhM8AAAACmRFqqQ", - "head_branch": "fSharpScriptsWithoutShebang-squashed2", - "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", - "status": "completed", - "conclusion": "success", - "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057", - "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", - "after": "86140764e7f95649a70f117067146d4a6b7c8201", - "pull_requests": [ - - ], - "app": { - "id": 15368, - "slug": "github-actions", - "node_id": "MDM6QXBwMTUzNjg=", - "owner": { - "login": "github", - "id": 9919, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", - "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github", - "html_url": "https://github.com/github", - "followers_url": "https://api.github.com/users/github/followers", - "following_url": "https://api.github.com/users/github/following{/other_user}", - "gists_url": "https://api.github.com/users/github/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github/subscriptions", - "organizations_url": "https://api.github.com/users/github/orgs", - "repos_url": "https://api.github.com/users/github/repos", - "events_url": "https://api.github.com/users/github/events{/privacy}", - "received_events_url": "https://api.github.com/users/github/received_events", - "type": "Organization", - "site_admin": false - }, - "name": "GitHub Actions", - "description": "Automate your workflow from idea to production", - "external_url": "https://help.github.com/en/actions", - "html_url": "https://github.com/apps/github-actions", - "created_at": "2018-07-30T09:30:17Z", - "updated_at": "2019-12-10T19:04:12Z", - "permissions": { - "actions": "write", - "administration": "read", - "checks": "write", - "contents": "write", - "deployments": "write", - "discussions": "write", - "issues": "write", - "merge_queues": "write", - "metadata": "read", - "packages": "write", - "pages": "write", - "pull_requests": "write", - "repository_hooks": "write", - "repository_projects": "write", - "security_events": "write", - "statuses": "write", - "vulnerability_alerts": "read" - }, - "events": [ - "branch_protection_rule", - "check_run", - "check_suite", - "create", - "delete", - "deployment", - "deployment_status", - "discussion", - "discussion_comment", - "fork", - "gollum", - "issues", - "issue_comment", - "label", - "merge_group", - "milestone", - "page_build", - "project", - "project_card", - "project_column", - "public", - "pull_request", - "pull_request_review", - "pull_request_review_comment", - "push", - "registry_package", - "release", - "repository", - "repository_dispatch", - "status", - "watch", - "workflow_dispatch", - "workflow_run" - ] - }, - "created_at": "2023-02-23T12:10:48Z", - "updated_at": "2023-02-23T12:16:40Z", - "rerequestable": true, - "runs_rerequestable": false, - "latest_check_runs_count": 3, - "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057/check-runs", - "head_commit": { - "id": "86140764e7f95649a70f117067146d4a6b7c8201", - "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", - "message": "FileConventions: add HasCorrectShebang function", - "timestamp": "2023-02-23T12:02:15Z", - "author": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - }, - "committer": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - } - }, - "repository": { - "id": 550128772, - "node_id": "R_kgDOIMpMhA", - "name": "conventions", - "full_name": "realmarv/conventions", - "private": false, - "owner": { - "login": "realmarv", - "id": 50144546, - "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", - "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/realmarv", - "html_url": "https://github.com/realmarv", - "followers_url": "https://api.github.com/users/realmarv/followers", - "following_url": "https://api.github.com/users/realmarv/following{/other_user}", - "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", - "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", - "organizations_url": "https://api.github.com/users/realmarv/orgs", - "repos_url": "https://api.github.com/users/realmarv/repos", - "events_url": "https://api.github.com/users/realmarv/events{/privacy}", - "received_events_url": "https://api.github.com/users/realmarv/received_events", - "type": "User", - "site_admin": false - }, - "html_url": "https://github.com/realmarv/conventions", - "description": null, - "fork": true, - "url": "https://api.github.com/repos/realmarv/conventions", - "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", - "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", - "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", - "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", - "events_url": "https://api.github.com/repos/realmarv/conventions/events", - "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", - "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", - "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", - "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", - "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", - "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", - "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", - "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", - "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", - "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", - "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", - "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", - "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", - "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", - "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", - "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", - "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", - "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" - } - }, - { - "id": 11158210887, - "node_id": "CS_kwDOIMpMhM8AAAACmRTJRw", - "head_branch": "fSharpScriptsWithoutShebang-squashed2", - "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", - "status": "completed", - "conclusion": "success", - "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887", - "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", - "after": "86140764e7f95649a70f117067146d4a6b7c8201", - "pull_requests": [ - - ], - "app": { - "id": 15368, - "slug": "github-actions", - "node_id": "MDM6QXBwMTUzNjg=", - "owner": { - "login": "github", - "id": 9919, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", - "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github", - "html_url": "https://github.com/github", - "followers_url": "https://api.github.com/users/github/followers", - "following_url": "https://api.github.com/users/github/following{/other_user}", - "gists_url": "https://api.github.com/users/github/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github/subscriptions", - "organizations_url": "https://api.github.com/users/github/orgs", - "repos_url": "https://api.github.com/users/github/repos", - "events_url": "https://api.github.com/users/github/events{/privacy}", - "received_events_url": "https://api.github.com/users/github/received_events", - "type": "Organization", - "site_admin": false - }, - "name": "GitHub Actions", - "description": "Automate your workflow from idea to production", - "external_url": "https://help.github.com/en/actions", - "html_url": "https://github.com/apps/github-actions", - "created_at": "2018-07-30T09:30:17Z", - "updated_at": "2019-12-10T19:04:12Z", - "permissions": { - "actions": "write", - "administration": "read", - "checks": "write", - "contents": "write", - "deployments": "write", - "discussions": "write", - "issues": "write", - "merge_queues": "write", - "metadata": "read", - "packages": "write", - "pages": "write", - "pull_requests": "write", - "repository_hooks": "write", - "repository_projects": "write", - "security_events": "write", - "statuses": "write", - "vulnerability_alerts": "read" - }, - "events": [ - "branch_protection_rule", - "check_run", - "check_suite", - "create", - "delete", - "deployment", - "deployment_status", - "discussion", - "discussion_comment", - "fork", - "gollum", - "issues", - "issue_comment", - "label", - "merge_group", - "milestone", - "page_build", - "project", - "project_card", - "project_column", - "public", - "pull_request", - "pull_request_review", - "pull_request_review_comment", - "push", - "registry_package", - "release", - "repository", - "repository_dispatch", - "status", - "watch", - "workflow_dispatch", - "workflow_run" - ] - }, - "created_at": "2023-02-23T12:21:33Z", - "updated_at": "2023-02-23T12:26:13Z", - "rerequestable": true, - "runs_rerequestable": false, - "latest_check_runs_count": 3, - "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887/check-runs", - "head_commit": { - "id": "86140764e7f95649a70f117067146d4a6b7c8201", - "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", - "message": "FileConventions: add HasCorrectShebang function", - "timestamp": "2023-02-23T12:02:15Z", - "author": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - }, - "committer": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - } - }, - "repository": { - "id": 550128772, - "node_id": "R_kgDOIMpMhA", - "name": "conventions", - "full_name": "realmarv/conventions", - "private": false, - "owner": { - "login": "realmarv", - "id": 50144546, - "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", - "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/realmarv", - "html_url": "https://github.com/realmarv", - "followers_url": "https://api.github.com/users/realmarv/followers", - "following_url": "https://api.github.com/users/realmarv/following{/other_user}", - "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", - "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", - "organizations_url": "https://api.github.com/users/realmarv/orgs", - "repos_url": "https://api.github.com/users/realmarv/repos", - "events_url": "https://api.github.com/users/realmarv/events{/privacy}", - "received_events_url": "https://api.github.com/users/realmarv/received_events", - "type": "User", - "site_admin": false - }, - "html_url": "https://github.com/realmarv/conventions", - "description": null, - "fork": true, - "url": "https://api.github.com/repos/realmarv/conventions", - "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", - "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", - "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", - "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", - "events_url": "https://api.github.com/repos/realmarv/conventions/events", - "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", - "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", - "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", - "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", - "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", - "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", - "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", - "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", - "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", - "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", - "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", - "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", - "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", - "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", - "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", - "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", - "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", - "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" - } - } - ] -} -"""> +type Simple = JsonProvider let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample From c3157c5a3d2283849d7530d2114774f7ad0f227a Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:11:51 +0330 Subject: [PATCH 14/20] wip13 --- test10.fsx | 383 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 382 insertions(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index c83801072..37ec72768 100644 --- a/test10.fsx +++ b/test10.fsx @@ -2,7 +2,388 @@ open System.IO #r "nuget: FSharp.Data, Version=5.0.2" open FSharp.Data -let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") +// let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") + +let checkSuitsType = + """ +{ + "total_count": 2, + "check_suites": [ + { + "id": 11157990057, + "node_id": "CS_kwDOIMpMhM8AAAACmRFqqQ", + "head_branch": "fSharpScriptsWithoutShebang-squashed2", + "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", + "status": "completed", + "conclusion": "success", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057", + "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", + "after": "86140764e7f95649a70f117067146d4a6b7c8201", + "pull_requests": [ + + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-02-23T12:10:48Z", + "updated_at": "2023-02-23T12:16:40Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 3, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057/check-runs", + "head_commit": { + "id": "86140764e7f95649a70f117067146d4a6b7c8201", + "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", + "message": "FileConventions: add HasCorrectShebang function", + "timestamp": "2023-02-23T12:02:15Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + }, + { + "id": 11158210887, + "node_id": "CS_kwDOIMpMhM8AAAACmRTJRw", + "head_branch": "fSharpScriptsWithoutShebang-squashed2", + "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", + "status": "completed", + "conclusion": "success", + "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887", + "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", + "after": "86140764e7f95649a70f117067146d4a6b7c8201", + "pull_requests": [ + + ], + "app": { + "id": 15368, + "slug": "github-actions", + "node_id": "MDM6QXBwMTUzNjg=", + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "name": "GitHub Actions", + "description": "Automate your workflow from idea to production", + "external_url": "https://help.github.com/en/actions", + "html_url": "https://github.com/apps/github-actions", + "created_at": "2018-07-30T09:30:17Z", + "updated_at": "2019-12-10T19:04:12Z", + "permissions": { + "actions": "write", + "administration": "read", + "checks": "write", + "contents": "write", + "deployments": "write", + "discussions": "write", + "issues": "write", + "merge_queues": "write", + "metadata": "read", + "packages": "write", + "pages": "write", + "pull_requests": "write", + "repository_hooks": "write", + "repository_projects": "write", + "security_events": "write", + "statuses": "write", + "vulnerability_alerts": "read" + }, + "events": [ + "branch_protection_rule", + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "discussion", + "discussion_comment", + "fork", + "gollum", + "issues", + "issue_comment", + "label", + "merge_group", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "repository", + "repository_dispatch", + "status", + "watch", + "workflow_dispatch", + "workflow_run" + ] + }, + "created_at": "2023-02-23T12:21:33Z", + "updated_at": "2023-02-23T12:26:13Z", + "rerequestable": true, + "runs_rerequestable": false, + "latest_check_runs_count": 3, + "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887/check-runs", + "head_commit": { + "id": "86140764e7f95649a70f117067146d4a6b7c8201", + "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", + "message": "FileConventions: add HasCorrectShebang function", + "timestamp": "2023-02-23T12:02:15Z", + "author": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + }, + "committer": { + "name": "realmarv", + "email": "zahratehraninasab@gmail.com" + } + }, + "repository": { + "id": 550128772, + "node_id": "R_kgDOIMpMhA", + "name": "conventions", + "full_name": "realmarv/conventions", + "private": false, + "owner": { + "login": "realmarv", + "id": 50144546, + "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", + "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/realmarv", + "html_url": "https://github.com/realmarv", + "followers_url": "https://api.github.com/users/realmarv/followers", + "following_url": "https://api.github.com/users/realmarv/following{/other_user}", + "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", + "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", + "organizations_url": "https://api.github.com/users/realmarv/orgs", + "repos_url": "https://api.github.com/users/realmarv/repos", + "events_url": "https://api.github.com/users/realmarv/events{/privacy}", + "received_events_url": "https://api.github.com/users/realmarv/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/realmarv/conventions", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/realmarv/conventions", + "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", + "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", + "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", + "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", + "events_url": "https://api.github.com/repos/realmarv/conventions/events", + "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", + "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", + "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", + "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", + "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", + "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", + "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", + "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", + "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", + "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", + "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", + "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", + "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", + "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", + "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", + "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", + "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", + "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" + } + } + ] +} +""" type Simple = JsonProvider From 575c8c209f008cb93158b69a05419ab4379ae2ad Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:18:16 +0330 Subject: [PATCH 15/20] wip14 --- test10.fsx | 385 +---------------------------------------------------- 1 file changed, 2 insertions(+), 383 deletions(-) diff --git a/test10.fsx b/test10.fsx index 37ec72768..8011084ff 100644 --- a/test10.fsx +++ b/test10.fsx @@ -2,390 +2,9 @@ open System.IO #r "nuget: FSharp.Data, Version=5.0.2" open FSharp.Data -// let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") +let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") -let checkSuitsType = - """ -{ - "total_count": 2, - "check_suites": [ - { - "id": 11157990057, - "node_id": "CS_kwDOIMpMhM8AAAACmRFqqQ", - "head_branch": "fSharpScriptsWithoutShebang-squashed2", - "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", - "status": "completed", - "conclusion": "success", - "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057", - "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", - "after": "86140764e7f95649a70f117067146d4a6b7c8201", - "pull_requests": [ - - ], - "app": { - "id": 15368, - "slug": "github-actions", - "node_id": "MDM6QXBwMTUzNjg=", - "owner": { - "login": "github", - "id": 9919, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", - "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github", - "html_url": "https://github.com/github", - "followers_url": "https://api.github.com/users/github/followers", - "following_url": "https://api.github.com/users/github/following{/other_user}", - "gists_url": "https://api.github.com/users/github/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github/subscriptions", - "organizations_url": "https://api.github.com/users/github/orgs", - "repos_url": "https://api.github.com/users/github/repos", - "events_url": "https://api.github.com/users/github/events{/privacy}", - "received_events_url": "https://api.github.com/users/github/received_events", - "type": "Organization", - "site_admin": false - }, - "name": "GitHub Actions", - "description": "Automate your workflow from idea to production", - "external_url": "https://help.github.com/en/actions", - "html_url": "https://github.com/apps/github-actions", - "created_at": "2018-07-30T09:30:17Z", - "updated_at": "2019-12-10T19:04:12Z", - "permissions": { - "actions": "write", - "administration": "read", - "checks": "write", - "contents": "write", - "deployments": "write", - "discussions": "write", - "issues": "write", - "merge_queues": "write", - "metadata": "read", - "packages": "write", - "pages": "write", - "pull_requests": "write", - "repository_hooks": "write", - "repository_projects": "write", - "security_events": "write", - "statuses": "write", - "vulnerability_alerts": "read" - }, - "events": [ - "branch_protection_rule", - "check_run", - "check_suite", - "create", - "delete", - "deployment", - "deployment_status", - "discussion", - "discussion_comment", - "fork", - "gollum", - "issues", - "issue_comment", - "label", - "merge_group", - "milestone", - "page_build", - "project", - "project_card", - "project_column", - "public", - "pull_request", - "pull_request_review", - "pull_request_review_comment", - "push", - "registry_package", - "release", - "repository", - "repository_dispatch", - "status", - "watch", - "workflow_dispatch", - "workflow_run" - ] - }, - "created_at": "2023-02-23T12:10:48Z", - "updated_at": "2023-02-23T12:16:40Z", - "rerequestable": true, - "runs_rerequestable": false, - "latest_check_runs_count": 3, - "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11157990057/check-runs", - "head_commit": { - "id": "86140764e7f95649a70f117067146d4a6b7c8201", - "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", - "message": "FileConventions: add HasCorrectShebang function", - "timestamp": "2023-02-23T12:02:15Z", - "author": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - }, - "committer": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - } - }, - "repository": { - "id": 550128772, - "node_id": "R_kgDOIMpMhA", - "name": "conventions", - "full_name": "realmarv/conventions", - "private": false, - "owner": { - "login": "realmarv", - "id": 50144546, - "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", - "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/realmarv", - "html_url": "https://github.com/realmarv", - "followers_url": "https://api.github.com/users/realmarv/followers", - "following_url": "https://api.github.com/users/realmarv/following{/other_user}", - "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", - "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", - "organizations_url": "https://api.github.com/users/realmarv/orgs", - "repos_url": "https://api.github.com/users/realmarv/repos", - "events_url": "https://api.github.com/users/realmarv/events{/privacy}", - "received_events_url": "https://api.github.com/users/realmarv/received_events", - "type": "User", - "site_admin": false - }, - "html_url": "https://github.com/realmarv/conventions", - "description": null, - "fork": true, - "url": "https://api.github.com/repos/realmarv/conventions", - "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", - "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", - "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", - "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", - "events_url": "https://api.github.com/repos/realmarv/conventions/events", - "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", - "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", - "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", - "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", - "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", - "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", - "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", - "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", - "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", - "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", - "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", - "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", - "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", - "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", - "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", - "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", - "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", - "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" - } - }, - { - "id": 11158210887, - "node_id": "CS_kwDOIMpMhM8AAAACmRTJRw", - "head_branch": "fSharpScriptsWithoutShebang-squashed2", - "head_sha": "86140764e7f95649a70f117067146d4a6b7c8201", - "status": "completed", - "conclusion": "success", - "url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887", - "before": "b0d38475ff2e95f8f424c98a85efd39658d5ff15", - "after": "86140764e7f95649a70f117067146d4a6b7c8201", - "pull_requests": [ - - ], - "app": { - "id": 15368, - "slug": "github-actions", - "node_id": "MDM6QXBwMTUzNjg=", - "owner": { - "login": "github", - "id": 9919, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", - "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github", - "html_url": "https://github.com/github", - "followers_url": "https://api.github.com/users/github/followers", - "following_url": "https://api.github.com/users/github/following{/other_user}", - "gists_url": "https://api.github.com/users/github/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github/subscriptions", - "organizations_url": "https://api.github.com/users/github/orgs", - "repos_url": "https://api.github.com/users/github/repos", - "events_url": "https://api.github.com/users/github/events{/privacy}", - "received_events_url": "https://api.github.com/users/github/received_events", - "type": "Organization", - "site_admin": false - }, - "name": "GitHub Actions", - "description": "Automate your workflow from idea to production", - "external_url": "https://help.github.com/en/actions", - "html_url": "https://github.com/apps/github-actions", - "created_at": "2018-07-30T09:30:17Z", - "updated_at": "2019-12-10T19:04:12Z", - "permissions": { - "actions": "write", - "administration": "read", - "checks": "write", - "contents": "write", - "deployments": "write", - "discussions": "write", - "issues": "write", - "merge_queues": "write", - "metadata": "read", - "packages": "write", - "pages": "write", - "pull_requests": "write", - "repository_hooks": "write", - "repository_projects": "write", - "security_events": "write", - "statuses": "write", - "vulnerability_alerts": "read" - }, - "events": [ - "branch_protection_rule", - "check_run", - "check_suite", - "create", - "delete", - "deployment", - "deployment_status", - "discussion", - "discussion_comment", - "fork", - "gollum", - "issues", - "issue_comment", - "label", - "merge_group", - "milestone", - "page_build", - "project", - "project_card", - "project_column", - "public", - "pull_request", - "pull_request_review", - "pull_request_review_comment", - "push", - "registry_package", - "release", - "repository", - "repository_dispatch", - "status", - "watch", - "workflow_dispatch", - "workflow_run" - ] - }, - "created_at": "2023-02-23T12:21:33Z", - "updated_at": "2023-02-23T12:26:13Z", - "rerequestable": true, - "runs_rerequestable": false, - "latest_check_runs_count": 3, - "check_runs_url": "https://api.github.com/repos/realmarv/conventions/check-suites/11158210887/check-runs", - "head_commit": { - "id": "86140764e7f95649a70f117067146d4a6b7c8201", - "tree_id": "381222317743d7ccb6ae59ca9d4079c9f7ef882c", - "message": "FileConventions: add HasCorrectShebang function", - "timestamp": "2023-02-23T12:02:15Z", - "author": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - }, - "committer": { - "name": "realmarv", - "email": "zahratehraninasab@gmail.com" - } - }, - "repository": { - "id": 550128772, - "node_id": "R_kgDOIMpMhA", - "name": "conventions", - "full_name": "realmarv/conventions", - "private": false, - "owner": { - "login": "realmarv", - "id": 50144546, - "node_id": "MDQ6VXNlcjUwMTQ0NTQ2", - "avatar_url": "https://avatars.githubusercontent.com/u/50144546?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/realmarv", - "html_url": "https://github.com/realmarv", - "followers_url": "https://api.github.com/users/realmarv/followers", - "following_url": "https://api.github.com/users/realmarv/following{/other_user}", - "gists_url": "https://api.github.com/users/realmarv/gists{/gist_id}", - "starred_url": "https://api.github.com/users/realmarv/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/realmarv/subscriptions", - "organizations_url": "https://api.github.com/users/realmarv/orgs", - "repos_url": "https://api.github.com/users/realmarv/repos", - "events_url": "https://api.github.com/users/realmarv/events{/privacy}", - "received_events_url": "https://api.github.com/users/realmarv/received_events", - "type": "User", - "site_admin": false - }, - "html_url": "https://github.com/realmarv/conventions", - "description": null, - "fork": true, - "url": "https://api.github.com/repos/realmarv/conventions", - "forks_url": "https://api.github.com/repos/realmarv/conventions/forks", - "keys_url": "https://api.github.com/repos/realmarv/conventions/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/realmarv/conventions/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/realmarv/conventions/teams", - "hooks_url": "https://api.github.com/repos/realmarv/conventions/hooks", - "issue_events_url": "https://api.github.com/repos/realmarv/conventions/issues/events{/number}", - "events_url": "https://api.github.com/repos/realmarv/conventions/events", - "assignees_url": "https://api.github.com/repos/realmarv/conventions/assignees{/user}", - "branches_url": "https://api.github.com/repos/realmarv/conventions/branches{/branch}", - "tags_url": "https://api.github.com/repos/realmarv/conventions/tags", - "blobs_url": "https://api.github.com/repos/realmarv/conventions/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/realmarv/conventions/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/realmarv/conventions/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/realmarv/conventions/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/realmarv/conventions/statuses/{sha}", - "languages_url": "https://api.github.com/repos/realmarv/conventions/languages", - "stargazers_url": "https://api.github.com/repos/realmarv/conventions/stargazers", - "contributors_url": "https://api.github.com/repos/realmarv/conventions/contributors", - "subscribers_url": "https://api.github.com/repos/realmarv/conventions/subscribers", - "subscription_url": "https://api.github.com/repos/realmarv/conventions/subscription", - "commits_url": "https://api.github.com/repos/realmarv/conventions/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/realmarv/conventions/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/realmarv/conventions/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/realmarv/conventions/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/realmarv/conventions/contents/{+path}", - "compare_url": "https://api.github.com/repos/realmarv/conventions/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/realmarv/conventions/merges", - "archive_url": "https://api.github.com/repos/realmarv/conventions/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/realmarv/conventions/downloads", - "issues_url": "https://api.github.com/repos/realmarv/conventions/issues{/number}", - "pulls_url": "https://api.github.com/repos/realmarv/conventions/pulls{/number}", - "milestones_url": "https://api.github.com/repos/realmarv/conventions/milestones{/number}", - "notifications_url": "https://api.github.com/repos/realmarv/conventions/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/realmarv/conventions/labels{/name}", - "releases_url": "https://api.github.com/repos/realmarv/conventions/releases{/id}", - "deployments_url": "https://api.github.com/repos/realmarv/conventions/deployments" - } - } - ] -} -""" - -type Simple = JsonProvider +type Simple = JsonProvider let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample From 796f957f6681d25824430577e538da8b2828afa7 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:25:15 +0330 Subject: [PATCH 16/20] wip15 --- test10.fsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test10.fsx b/test10.fsx index 8011084ff..7eb8f40b2 100644 --- a/test10.fsx +++ b/test10.fsx @@ -2,9 +2,9 @@ open System.IO #r "nuget: FSharp.Data, Version=5.0.2" open FSharp.Data -let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") +// let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") -type Simple = JsonProvider +type Simple = JsonProvider<"../data/checkSuitsType.json"> let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample From ec0c2decaa6fa6f67f6133d715a0cbe9e656c42e Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:31:44 +0330 Subject: [PATCH 17/20] wip16 --- test10.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index 7eb8f40b2..95c596bc4 100644 --- a/test10.fsx +++ b/test10.fsx @@ -4,7 +4,7 @@ open FSharp.Data // let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") -type Simple = JsonProvider<"../data/checkSuitsType.json"> +type Simple = JsonProvider<(Path.Combine(__SOURCE_DIRECTORY__, "scripts", "checkSuitsType.json"))> let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample From d4a272c22ef5fca0914e3384eb3554c64758cd58 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:39:07 +0330 Subject: [PATCH 18/20] wip17 --- test10.fsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test10.fsx b/test10.fsx index 95c596bc4..fcf4a821f 100644 --- a/test10.fsx +++ b/test10.fsx @@ -3,8 +3,9 @@ open System.IO open FSharp.Data // let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") - -type Simple = JsonProvider<(Path.Combine(__SOURCE_DIRECTORY__, "scripts", "checkSuitsType.json"))> +let path = Path.Combine(__SOURCE_DIRECTORY__, "scripts", "checkSuitsType.json") +printfn "path: %A" path +type Simple = JsonProvider let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample From 7a71b07e20d80fa1ba108bb974f6c85e6f6d40c8 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:43:26 +0330 Subject: [PATCH 19/20] wip18 --- test10.fsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test10.fsx b/test10.fsx index fcf4a821f..9ecb948e7 100644 --- a/test10.fsx +++ b/test10.fsx @@ -3,9 +3,7 @@ open System.IO open FSharp.Data // let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") -let path = Path.Combine(__SOURCE_DIRECTORY__, "scripts", "checkSuitsType.json") -printfn "path: %A" path -type Simple = JsonProvider +type Simple = JsonProvider let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample From 88eb788cfaf75a2b1e40d63b50ce4a47d7ad87b9 Mon Sep 17 00:00:00 2001 From: realmarv Date: Mon, 27 Mar 2023 14:51:15 +0330 Subject: [PATCH 20/20] wip19 --- test10.fsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test10.fsx b/test10.fsx index 9ecb948e7..2826d1b51 100644 --- a/test10.fsx +++ b/test10.fsx @@ -2,8 +2,10 @@ open System.IO #r "nuget: FSharp.Data, Version=5.0.2" open FSharp.Data +[] +let ResolutionFolder = __SOURCE_DIRECTORY__ // let checkSuitsType = File.ReadAllText("scripts/checkSuitsType.json") -type Simple = JsonProvider +type Simple = JsonProvider<"scripts/checkSuitsType.json", ResolutionFolder=ResolutionFolder> let sample = File.ReadAllText("scripts/sample.json") let value = Simple.Parse sample