How to disable pull requests in GitHub?

前端 未结 4 1444
死守一世寂寞
死守一世寂寞 2021-02-05 03:45

I am trying to understand how will I be able to disable \"pull requests\" in github.

Question 1: We are trying to use the rebase workflow and that means using pull requ

相关标签:
4条回答
  • 2021-02-05 04:12

    You can't setup branch permissions with Github. However, if you're the only one with push permissions, you don't have to forbid the creation of pull requests: you could just rebase and push them manually.

    A tool which my fit your needs is Gerrit. It's an open source software which act like a kind of wrapper around Git. It's mostly a code review software. But it will also allow you to define permissions per branches.

    However, a difference with Github, is that you'll likely have to host it yourself.

    0 讨论(0)
  • 2021-02-05 04:20

    It is not possible according to GitHub support

    I asked support support@github.com on February 2018 if it was possible to remove the Pull Requests tab, and the reply from @nickcannariato was:

    Thanks for writing in! We've definitely heard some users requesting this feature over the last couple of years, and it's currently on our feature request list. I can't make any promises about if or when we may add this ability in the future, but I'll add your +1 to that feature request so the team can see it.

    confirming that it is not possible.

    Request on the de-facto trackers:

    • https://github.com/isaacs/github/issues/1191
    • https://github.com/dear-github/dear-github/issues/84
    0 讨论(0)
  • 2021-02-05 04:28

    I made a tool to automatically close pull requests as they are opened.

    https://nopullrequests.appspot.com

    0 讨论(0)
  • 2021-02-05 04:30

    How to disable pull requests in GitHub?

    So far (Q2 2020): not possible.

    Update Sept. 2020, this "dear-github" issue point out in the comments to the GitHub Action "Repo Lockdown": it can help prevent any new PR on a GitHub repository.

    Oct. 2020: "GitHub Actions: Fine-tune access to external actions" means that you can disable external GitHub Action that would create PR (or have any other effect on your repository)


    Armin Sebastian suggests in GitHub issue 1191

    I've made a new app that immediately closes and locks new and existing issues or pull requests and also supports posting a comment and labeling.
    It is perfect for forks and mirrors, and you can configure it to your liking

    dessant/repo-lockdown, with a .github/lockdown.yml including

    # Lock issues and pull requests
    lock: true
    
    # Limit to only `issues` or `pulls`
    # only: pull
    

    Other workaround:

    Note that (considering the OP dates from January 2015):

    • since Sept 2015, you can protect branches in a GitHub repo.

      That means a protected branch:

    • Can't be force pushed

    • Can't be deleted

    • Can't have changes merged into it until required status checks pass

    • Can't have changes merged into it until required reviews are approved

    • Can't be edited or have files uploaded to it from the web

    And Since October 2016, you can dismiss a review

    However, this requirement can sometimes block your team’s progress without good reason.
    If someone leaves a review that requests changes and then goes on vacation or runs into computer problems, your pull request could be blocked for days, even after you’ve addressed the reviewer’s concerns.

    This will unblock your pull request, freeing you up to merge it!

    0 讨论(0)
提交回复
热议问题