nopr

package module
v0.0.0-...-1023bf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

README

GitHub Pull Request Rejection Bot

Some projects on GitHub don't accept GitHub Pull Requests. Maybe they have their own contribution processes. Maybe they hate freedom. Either way, GitHub doesn't provide a way to disable pull requests officially.

So I wrote this.

Using this tool, you can effectively disable pull requests for your repo on GitHub. When pull requests are disabled, any time a new one is opened it will immediately be closed by the bot.

Sound fun? Let's get started

(Ironically, this project does accept pull requests...)


License

Copyright 2015 Jason Hall

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteRepo

func DeleteRepo(ctx appengine.Context, fn string) error

func DeleteUser

func DeleteUser(ctx appengine.Context, userID string) error

func PutRepo

func PutRepo(ctx appengine.Context, r Repo) error

func PutUser

func PutUser(ctx appengine.Context, u User) error

Types

type Repo

type Repo struct {
	FullName  string // e.g., MyUser/foo-bar
	UserID    string // User key to use to close PRs
	WebhookID int    // Used to delete the hook
}

func GetRepo

func GetRepo(ctx appengine.Context, fn string) *Repo

func (Repo) Split

func (r Repo) Split() (string, string)

type User

type User struct {
	GoogleUserID string
	GitHubUserID int
	GitHubToken  string
}

func GetUser

func GetUser(ctx appengine.Context, id string) *User

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL