GithubHelp home page GithubHelp logo

wei / pull Goto Github PK

View Code? Open in Web Editor NEW
5.8K 61.0 619.0 5.12 MB

๐Ÿค– Keep your forks up-to-date via automated PRs

Home Page: https://github.com/apps/pull

License: MIT License

JavaScript 97.49% Dockerfile 2.51%
probot sync fork upstream repository-management pull forks-insight upstreams reviewer reviewers

pull's Introduction

Pull App

Probot Featured GitHub Stars
Managing Installations Triggered #

Table of Contents

Introduction

GitHub Status TravisCI Codecov Probot JavaScript Style Guide jest MIT License

๐Ÿค– a GitHub App built with probot that keeps your forks up-to-date with upstream via automated pull requests.

Trusted by Repository Count repositories, triggered Triggered #.

Can you help keep this open source service alive? ๐Ÿ’– Please sponsor : )

Features

  • Ensure forks are updated.
  • Automatically integrate new changes from upstream.
  • Pull requests are created when upstreams are updated.
  • Automatically merge or hard reset pull requests to match upstream.
  • Add assignees and reviewers to pull requests.
  • Customize pull request label.
  • Honor branch protection rules.
  • Work well with pull request checks and reviews.

Prerequisites

  • Upstream must be in the same fork network.
  • โš ๏ธ Make a backup if you've made changes.

Getting Started

โญ Star this project (Highly recommended, starred users may receive priority over regular users)

Basic Setup

Pull app will automatically watch and pull in upstream's default (master) branch to yours using hard reset every few hours. You can also manually trigger it anytime.

Advanced Setup (with config)

  1. Create a new branch.

  2. Setup the new branch as default branch under repository Settings > Branches.

  3. Add .github/pull.yml to your default branch.

    Most Common

    (behaves the same as Basic Setup)

    version: "1"
    rules:
      - base: master
        upstream: wei:master    # change `wei` to the owner of upstream repo
        mergeMethod: hardreset

    Advanced usage

    version: "1"
    rules:                      # Array of rules
      - base: master            # Required. Target branch
        upstream: wei:master    # Required. Must be in the same fork network.
        mergeMethod: hardreset  # Optional, one of [none, merge, squash, rebase, hardreset], Default: none.
        mergeUnstable: false    # Optional, merge pull request even when the mergeable_state is not clean. Default: false
      - base: dev
        upstream: master        # Required. Can be a branch in the same forked repo.
        assignees:              # Optional
          - wei
        reviewers:              # Optional
          - wei
        conflictReviewers:      # Optional, on merge conflict assign a reviewer
          - wei
    label: ":arrow_heading_down: pull"  # Optional
    conflictLabel: "merge-conflict"     # Optional, on merge conflict assign a custom label, Default: merge-conflict
  4. Go to https://pull.git.ci/check/${owner}/${repo} to validate your .github/pull.yml (Public repos only). See #234 for another way to validate it.

  5. Install <img src="https://prod.download/pull-18h-svg" valign="bottom"/> Pull Pull app.

Trigger manually

Go to https://pull.git.ci/process/${owner}/${repo} to manually trigger pull. Note: Nothing will happen if your branch is already even with upstream.

For Repository Owners

For the most common use case (a single master branch), you can just direct users to install Pull with no configurations. If you need a more advanced setup (such as a docs branch in addition to master), consider adding .github/pull.yml to your repository pointing to yourself (see example). This will allow forks to install Pull and stay updated automatically.

Example (assuming owner is your user or organization name):

version: "1"
rules:
  - base: master
    upstream: owner:master
    mergeMethod: hardreset
  - base: docs
    upstream: owner:docs
    mergeMethod: hardreset

Author

Wei He [email protected]

License

MIT

pull's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar depfu[bot] avatar jnewland avatar kurtmckee avatar muescha avatar rdil avatar saurabh702 avatar snyk-bot avatar wei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pull's Issues

Sync with upstream branches

Dear Wei,

is there a way to let the pull bot automatically create, update, delete branches from the upstream repo?
And automatically set the same repo as default repo, like the upstream repo?

Or do I need to manually create some pull.yml config and delete/create old/new branches by hand?

In my case I work on an android kernel repo, where the branches are different qualcomm branches (different devices and kernel versions).

(My own branches are created with {MyUsername}/Branchname} to make sure Upstream will never use the same branch name I did choose for my modifications.

PS: I love your pull bot.

Unwanted upstream degradation from this app.

I've started to recently observe some anomalies in GitHub's commit->PR references, e.g. rust-lang/rust@33caf0b doesn't point to the rust-lang/rust#67800 PR, which it was a part of.

Instead, it points to https://github.com/nifftytech/rust/pull/85, which is a fork using this pull app to keep up to date.
If #57 had been fixed then this wouldn't really be a problem, because there would be no PRs to confuse GitHub, but as it stands this is undesireable for upstream rust-lang/rust.

Arguably this is partly a @github bug, in that it shouldn't care about forks as much as it seems to right now, but until that changes, using PRs should be considered intrusive (and not just in terms of notifications) and to be avoided at all cost.

I will try to get in contact with someone from @nifftytech and ask them to disable this app and remake the fork, hopefully that would fix GitHub's references.

Does it work with renamed repositories?

I'm getting error on checking config. It currently says:

.github/pull.yml file has failed validation

The config: https://github.com/it-projects-llc/shhvshhshhshh/blob/e8c4ca3c03600484a5cb01d18e7e99a9b0347825/.github/pull.yml

version: "1"
rules:
  - base: 13.0
    upstream: odoo:13.0
    mergeMethod: merge
  - base: 12.0
    upstream: odoo:12.0
    mergeMethod: merge
label: ":alien: pull from odoo" 

My only guess is that it doesn't work because the fork is renamed:

two-way syncing with a public and private repo pair?

Hey @wei, this app looks really cool! โœจ

I'm working on a project at GitHub that is currently private but will soon be open-sourced. We're looking for ways to keep a private and public repo in sync with each other.

Could this app be installed on two repos, each referring to the other as upstream? I looked through the README, and In its current state, I'm guessing that functionality doesn't exist yet for private repos. But maybe it can... I'm interested to hear your thoughts. ๐Ÿค”

Rebase mode not working as intended ?

Hello,
when using the rebase mode, I would expect the commits from my fork to be added after the ones fetched from the original repo, like using:

git fetch origin
git rebase origin/master

while already being on the target branch.
So basically, following the updates from the original repo, while adding my own patches to the project waiting for them to be merged.
What I actually see is that the new commtis from the original repo are added after mine, so it make it difficult to track my modifications that are waiting to be merged.
Also the bot is trying to rebase the same comits every hour after a new commit is available on the original repo, while when I do the rebase with the previous commands it's just waiting for new commits to rebase.

Am I missing/misunderstanding something ? Or is there another mode that I should use ?

Case sensitivity

For validation of pull.yml, owner name in https://pull.git.ci/check/${owner}/${repo} is case insensitive but for manually triggering Pull app the owner name in https://pull.git.ci/process/${owner}/${repo} is case sensitive.

For example, for one of my forked repositories the following links work for validation of pull.yml
https://pull.git.ci/check/Saurabh702/notepad-plus-plus
https://pull.git.ci/check/saurabh702/notepad-plus-plus

But incase of manually triggering the Pull app,
only this https://pull.git.ci/process/Saurabh702/notepad-plus-plus link seems to work

This https://pull.git.ci/process/saurabh702/notepad-plus-plus link returns "Not found"

Private repositories

Does it work with private repositories?

I've installed the app and granted permission to my private repository but it doesn't seem to work, and https://pull.now.sh says File not found.

Duplicate plugin triggers

I have a forked repository that is configured to sync with upstream using the pull plugin:

https://github.com/prosemirror-esm/prosemirror-tables/commits/master

The forked repository includes some minor changes on a few files compared to the master but it must remain in sync with upstream, so it is configured to rebase on merge:

https://github.com/prosemirror-esm/prosemirror-tables/blob/master/.github/pull.yml

This morning new commits have been added in the parent repository. The pull plugin was triggered on the fork and the changes merged correctly (I was really happy to see the plugin in action at this point):

https://github.com/prosemirror-esm/prosemirror-tables/pull/1

Unfortunately, after some minutes, a new PR was created and merged but for changes related to the previous merge, not for new changes on upstream:

https://github.com/prosemirror-esm/prosemirror-tables/pull/2

At first sight, it looks like a bug?

Sync after installation of the app

when:

  • i have an repo with ~200 commits behind the source
  • i just added the app to my repo

what i see:

  • nothing happens - no new pr / changes
  • i fear that i have to wait until the next commit in the source repo?

what i expect:

  • an button: sync now so that i am direct after installation can be up to date with the source

Create a PR instead of a hard reset?

It would be great to have an option to configure the app to create a PR on the fork to notify of upstream changes. A hard reset, unfortunately, could lead to desired changes being lost.

Would this be possible?

Possibility to sync fork having submodules

Hi,
Pull is a great github app, I'm using it tot trigger package build.
As in Launchpad PPA have to be handled manually, Is there a way to sync our our fork from master branch but including also potential included submodules. (For now the submodule folder is empty)
I tried to look at the doc and maybe try to trigger it from Pull config file but I'm not sure this is possible.

[EDIT]: It would be great to have the list of the fork and the check that can be ticked. (The cjeckbox would indicate if the submodule have to be also keep in sync recursively)
Thanks !

Frederic LOUI

Does this require github pro?

Details:

### ERRORED 00:06:14Z

- Workflows can't be executed on this repository. Please check your payment method or billing status.

dunno what this means

Pull changes from non-forked upstream remotes?

I have a GitHub template repository that contains a customised starter project for my framework of choice. I then clone that repository under new names to start new projects based on that starter template.

Sometimes I make changes to the "base" code in the template repository which I want to merge in to all the project repositories that I derived from it, so they can all benefit from changes to the common code. I can easily do this manually by adding the template repository as an upstream remote and creating a merge commit, but it would be even nicer if I could have Probot make PRs for this automatically.

It is not possible for me to use forks for my use case because GitHub does not allow forking within the same account or organization. It's also not the case that changes in the derived repositories will ever by merged back in to the template repository - the flow of changes is one way only, so forking might not be the right model anyway.

So my question is: Can (or should) Pull be able to support this use case?

It would require that the upstream could be specified in pull.yml as a repository name and branch, rather than only an account name and branch, which doesn't appear to be supported. But maybe there is more to it than that.

Note that all the repositories in my example are private, but that might not always be the case.

Trigger Notification if there is a Merge Conflict

This is the pull.yml file I am using for my forked repo.

version: "1"
rules:
  - base: feature
    upstream: master
    mergeMethod: merge
  - base: master
    upstream: parent_repo:master
    mergeMethod: hardreset

This keeps the master branch of the forked repo up-to-date with the parent repo. It keeps the feature branch of the forked repo updated via the master the branch of the forked repo by merging the same.

So the pull app opens a PR, performs the merge operations and closes the PR on its own. However, if a merge between feature branch and master branch leads to a conflict, the PR remains open waiting for conflicts to be resolved.

To inform the user of such conflict via mail, one could edit the pull.yml file and add the assignee or reviewer parameter. But this would lead to triggering of a notification via mail whenever any PR is opened and closed. Is it possible to set a rule such that if there is a merge conflict, the PR is assigned a assignee or reviewer ?

fetch --tags on pull ?

Nice work! ๐Ÿ‘

I didn't see a way to fetch tags from remote using pull. Did I miss it somehow?

If not, it'll be a great feature addition.

Private repo problem

I've read #112 . I have the same problem. But I'm sure my repo was forked from a personal account.

image

I followed the Advanced Setup (with config) to setup my forked private repo, grand permisstion to my forked private repo.

image

.github/pull.yml file looks like

version: "1"
rules:
  - base: master
    upstream: stackia:master
    mergeMethod: hardreset
  - base: hzv2
    upstream: stackia:hzv2
    mergeMethod: hardreset

And set this branch as default.

Go to https://pull.now.sh/check/${owner}/${repo}, it said File not found.

Then I found that the commits after forked not updated.

Did I miss something?

Thank you in advance. :)

Auto-update all branches

Hey,
Is there a way to auto-update every branch of the repository? Maybe even branches created after the fork?
From reading the README I only found a way to auto update a single branch

Thanks

Cannot compare 404

I sadly get
Cannot compare 404 - {"message":"Not Found","documentation_url":"https://developer.github.com/v3/repos/commits/#compare-two-commits"}
at
https://pull.git.ci/check/MartinX3sAndroidDevelopment/TWRP_sonyxperiadev-kernel

That's my config file
https://github.com/MartinX3sAndroidDevelopment/TWRP_sonyxperiadev-kernel/blob/aosp/LE.UM.2.3.2.r1.4/.github/pull.yml

Does pull hate the branch name?
It's a normal Qualcomm branch name.

Sadly I need to put a config file in every repo to have "rebase" as default, because I don't want to loose my development in the try to stay in sync with the upstream fork.

Push straight to master

Hey! Loving this plugin, but do you think it would be possible to configure (globally) that the app should just push to master without going through a PR? I don't want to get the notifications from the PRs, they're not interesting to me.

I suppose an option to turn them on per repo makes sense if people want

My master didn't become even with upstream

Hello and thank you for this application.

I installed it a few days ago and when it was triggered the first time I got expected result - my master branch was marked "even" with upstream.

Today the app was triggered again but now I see "This branch is 25 commits ahead..."
The comparison indicates zero changes, i.e. contents of my master and upstream are identical.

What should I do if I want to always see my branch "even" with upstream?

Thank you!

UPD: Today the app was triggered again and now I have "This branch is even with ..." back.

Is there a way to not get notifications?

Is there? I have it enabled in a few of my repos, and sometimes it's a loooot of notifications.

PS: Thank you for this bot. It's so awesome. Simple but so useful!

Method to bypass required reviewers

We have a config that uses mergeMethod: merge

version: '1'
rules:
  - base: master
    upstream: release
    mergeMethod: merge

Pull requests from pull are automatically merged after someone clicks approve.

Is there any way to get the app to merge automatically (bypassing reviewers?)

How can I stop email notification sent by 'pull'?

I installed 'pull' on most my repositories.

I received many email notification by 'pull'. And I receiving many email notification sent by 'pull' everyday.

How can I stop email notification sent by 'pull'? If this feature is available in the option, please let me know.

Pull bot triggers a build in GitHub Actions every hour without change in upstream

Hi,

Using the pull bot, we have detected that it is triggering a build every hour without none change from upstream. Always it is triggered with the same commit.

image

Private Repo?

Hi,

Does the Pull app work with private repo's? I did look at issues #124 and #112 but not 100% clear. My company has a private repo which I have forked. I installed Pull on my forked repo and triggered manually (with success). However, I'm not seeing a Pull Request generated. There are no branch restrictions on my forked repo. Are private repo's supported?

Suggestion: Pull app and logo color enhancement

The Problem,

As a Github Dark user/maintainer and pull app user, I find the pull app icon/avatar and README svg too dark when using GitHub Dark.

While this isnt an issue for pull app necessarily, I would still like to make this suggestion.
If I may suggest #4b4b4b instead of #333333 it would work well both in Dark vs light (default) backgrounds. Here is the token picture is worth a million discombobulated words.

Capture

generic

Also attached a modified https://prod.download/pull-svg
grab here in zip pull-svg-#4b4b4b.zip feel free to use/not use.

Thank you in advance for any consideration.

Do not reset hard my default branch

All my forks have things in the master branch, and cannot be reset hard with the upstream otherwise I lose my stuff. I just need for this package to create the pull request, and may be merge them automatically, if not conflicts are found. Otherwise I manually merge locally.

If I understand correctly, for me to use this package I would be required to edit all my forks and create the configuration file disabling the reset hard setting like this:

version: "1"
rules:
  - base: master
    upstream: wei:master        # change wei to the owner of upstream repo
    autoMerge: true
    autoMergeHardReset: false

pull another branch

I want to pull another branch such as devel, but I don't want to modify the source code. How can I do it?

Failing commits on master

Whenever some code is pushed to the master of any upstream repo that I have forked, pull is able to fetch the commits into my fork but the checks fail, even though they pass in upstream. Here are some examples

Suggestion: Consider adding it to GitHub Marketplace

Hi =) Thanks for making this useful project available

I have been looking for something like this for a while, though its not available in GH Marketplace, perhaps something you could consider in future.

Be well =)

Ability to skip pull worning in a Repo

I really love the application and have somewhere about 60 repos (at time of writing)

I don't want to update one of them, but don't want to manually add all my repos to the list during integration.

Is there any method through which I can disable pull for only one repository?

Deployment for GHE fail to auto merge

I have created a standalone deployment for GHE . I created a repo and make develop branch as a default but when checking to validate it gives me error

.github/pull.yml file was either not found or failed validation

and from the logs it returns 400

15:53:58.215Z  INFO http: GET /tcduser/test-stale 404 - 0.80 ms (id=02297985-629c-xxx-bd6d-xxxx2)
15:53:58.603Z  INFO http: GET /favicon.ico 404 - 0.45 ms (id=cdd24802-c24c-4bbd-xx-xxxxxx)
15:54:51.931Z  INFO probot: [tcduser/test-stale] Checking pull.yml
15:54:52.289Z  INFO http: GET /check/tcduser/test-stale 400 - 358.46 ms (id=xxxx-b487-xxx-902e-a0fe2fb0xxx)
15:55:46.743Z  INFO probot: [tcduser/test-stale] Checking pull.yml
15:55:47.000Z  INFO http: GET /check/tcduser/test-stale 400 - 257.29 ms (id=xxx-4255-xxx-9666-8982e72xxxx)

the pull.yml content

version: "1"
rules:
  - base: develop
    upstream: elsayed-atefesayed:develop        
    autoMerge: true
    autoMergeHardReset: true

elsayed-atefesayed is the upstream

Suggestion: create PRs by schedule

Hello,

I'm looking for a way to automate sync master branch with prod once a week. This bot seems do something close to what I want except the schedule part. Would it be possible to add such support?

(Also, I assume that the bot can work with 2 branches in a single repo, not forks.)

[Feature Request] Synchronize releases to upstream

Hello,

I'm building some Docker container and would like to sync with the upstream releases so my container will be automatically updated and deployed to a stable version. Is that possible with pull?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.