Skip to content

Commit

Permalink
Remove code which allows merging of PRs (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey authored May 15, 2024
1 parent 0184e6b commit b2ddb4d
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 507 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on: pull_request

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

- Adds a label for any new PR by a core team member
- Assigns a core team member to their own PR if no-one is assigned
- Allows merging on green when a PR's statuses are all green and there is a label "Merge on Green" on the PR

#### Issues

Expand Down
28 changes: 3 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"dependencies": {
"@azure/functions": "^4.4.0",
"@octokit/rest": "^20.1.1",
"@octokit/webhooks-methods": "^4.1.0",
"minimatch": "^9.0.4"
"@octokit/webhooks-methods": "^4.1.0"
},
"devDependencies": {
"@octokit/webhooks-types": "^7.5.1",
Expand Down
6 changes: 0 additions & 6 deletions src/anyRepoHandleIssueComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { HttpResponseInit, InvocationContext } from "@azure/functions"
import { createGitHubClient } from "./util/createGitHubClient"
import { Octokit } from "@octokit/rest"
import { sha } from "./sha"
import { mergeThroughCodeOwners } from "./checks/mergeThroughCodeOwners"
import { addReprosLabelOnComments } from "./checks/addReprosLabel"
import { Logger } from "./util/logger"

Expand All @@ -20,11 +19,6 @@ export const anyRepoHandleIssueCommentPayload = async (payload: IssueCommentEven
return fn(api, payload, context)
}

// Making this one whitelisted to the website for now
if (payload.repository.name === "TypeScript-Website") {
await run("Checking if we should merge from codeowners", mergeThroughCodeOwners)
}

if (payload.repository.name === "TypeScript") {
await run("Checking if we should add the repros label", addReprosLabelOnComments)
}
Expand Down
6 changes: 0 additions & 6 deletions src/anyRepoHandleStatusUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { StatusEvent } from "@octokit/webhooks-types"
import { createGitHubClient } from "./util/createGitHubClient"
import { Octokit } from "@octokit/rest"
import { sha } from "./sha"
import { mergeOnGreen } from "./checks/mergeOnGreen"
import { HttpResponseInit, InvocationContext } from "@azure/functions"
import { Logger } from "./util/logger"

Expand All @@ -16,11 +15,6 @@ export const anyRepoHandleStatusUpdate = async (payload: StatusEvent, context: I
return fn(api, payload, context)
}

// Run checks
if (payload.repository.name === "TypeScript-Website") {
await run("Checking For Merge on Green", mergeOnGreen)
}

return {
status: 200,
headers: { sha: sha },
Expand Down
83 changes: 0 additions & 83 deletions src/checks/mergeOnGreen.test.ts

This file was deleted.

56 changes: 0 additions & 56 deletions src/checks/mergeOnGreen.ts

This file was deleted.

93 changes: 0 additions & 93 deletions src/checks/mergeThroughCodeOwners.test.ts

This file was deleted.

Loading

0 comments on commit b2ddb4d

Please sign in to comment.