Skip to content

Commit

Permalink
scripts/checkCommits1by1.fsx: cosmetic
Browse files Browse the repository at this point in the history
Rename type to be PascalCase, and remove unneeded parameter.
  • Loading branch information
knocte committed Jul 5, 2023
1 parent ae38002 commit eca6c75
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/checkCommits1by1.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ let accessTokenName, accessToken =
printfn "Using access token %s" accessTokenName
Console.WriteLine()

type githubEventType =
type GithubEventType =
JsonProvider<"""
{
"action": "opened",
Expand Down Expand Up @@ -560,7 +560,7 @@ type githubEventType =
""">

let jsonString = File.ReadAllText githubEventPath
let parsedJsonObj = githubEventType.Parse jsonString
let parsedJsonObj = GithubEventType.Parse jsonString

let gitForkUser = parsedJsonObj.PullRequest.Head.User.Login
let gitForkRepo = parsedJsonObj.PullRequest.Head.Repo.Name
Expand Down Expand Up @@ -829,7 +829,7 @@ variable in your GitHubCI workflow:
```
"""

let GitHubApiCall (url: string) (accessToken: string) =
let GitHubApiCall (url: string) =
let userAgent = ".NET App"
let xGitHubApiVersion = "2022-11-28"

Expand Down Expand Up @@ -876,7 +876,7 @@ let GitHubApiCall (url: string) (accessToken: string) =
let prCommits =
let url = parsedJsonObj.PullRequest.Links.Commits.Href

let prCommitsJsonString = GitHubApiCall url accessToken
let prCommitsJsonString = GitHubApiCall url

let parsedPrCommitsJsonObj = PRCommitsType.Parse prCommitsJsonString
parsedPrCommitsJsonObj |> Seq.map(fun commit -> commit.Sha)
Expand All @@ -894,7 +894,7 @@ let hasCiStatus =
gitRepo
commit

let json = GitHubApiCall url accessToken
let json = GitHubApiCall url

not(json.Contains "\"check_suites\":[]")
)
Expand Down Expand Up @@ -1313,7 +1313,7 @@ prCommits
gitRepo
commit

let checkSuitesJsonString = GitHubApiCall url accessToken
let checkSuitesJsonString = GitHubApiCall url

let checkSuitesParsedJson = CheckSuitesType.Parse checkSuitesJsonString

Expand Down

0 comments on commit eca6c75

Please sign in to comment.