GithubHelp home page GithubHelp logo

Comments (4)

vadimberezniker avatar vadimberezniker commented on June 15, 2024 1

A branch can be incompatible w/o introducing merge conflicts.
e.g.
person1 merges a change into master that changes a function definition from Foo() to Foo(string) in foo.go
person2 has a PR that adds bar.go that calls Foo() without the string argument.

If person2 does not have person1's change in their local branch, the PR check will pass and they will be able to merge their change.

from buildbuddy.

bduffany avatar bduffany commented on June 15, 2024

Summarizing my understanding here (for context) -- GitHub exposes a special ref refs/pull/:prNumber/merge which points to what the state of the base branch would be after merging. The feature request here would be to run against that resolved ref as the commit SHA for the workflow, rather than the PR commit SHA.

Seems like a reasonable thing to do, although I'm not sure if it matches the users' expectations.

from buildbuddy.

vadimberezniker avatar vadimberezniker commented on June 15, 2024

The main purpose of the PR check is to make sure that a PR won't break master.

Not using the latest merge has two potential problems:

  1. master was broken but is now fixed but user can't merge until they sync their branch even if the breakage had nothing to do with their change
  2. if a change was merged into master that is incompatible with the PR it won't be detected by the PR check if the user has not pulled the incompatible change into their branch

(2) is the bigger problem

from buildbuddy.

bduffany avatar bduffany commented on June 15, 2024

One thing that mitigates (2) a bit is that GitHub doesn't let you merge a branch that's incompatible. I think it makes you resolve merge conflicts before you're able to merge, which means it'll run another CI check once you push up the merge resolution.

from buildbuddy.

Related Issues (20)

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.