Giter Club home page Giter Club logo

Comments (4)

pascalgn avatar pascalgn commented on August 15, 2024

I'm not sure if the action should fail in this case, because then it could happen that GH cannot merge the PR, depending on the configured required actions. Failure should only happen in the case of authentication failure, network timeout when calling the API and similar, IMO.

Maybe #36 could help instead?

from automerge-action.

jantari avatar jantari commented on August 15, 2024

I'm sorry I can't quite follow that argument.

You're saying that, if the action were to fail, "it could happen that GH cannot merge the PR" - but isn't that precisely what the action itself tried to do? You kick it off with the expectation to have it merge a PR. Now, when that cannot happen due to any number of issues - the merge failed. So if the merge never happened, I don't see how that could be considered a successful run of a "merge" action.

depending on the configured required actions

I'm assuming you mean branch protection rules and required checks?

If someone configured an automerge action as a "required check" for a PR to be merged, that's a misconfiguration (user error) and you don't have to consider it. It makes no sense to me, even currently, to require a merge to succeed in order to allow a merge - if it succeeded, there's no need or even ability to merge the exact same PR again. Or maybe I'm misunderstanding.

#36 could serve as a workaround - although I really would prefer a default behavior, or at the very least option, of failing anytime it didn't succeed. In the end, it doesn't matter whether the merge failed due to API rate limiting being hit or due to required checks being in progress -> the outcome is no merge was done, aka the merge step failed.

from automerge-action.

pascalgn avatar pascalgn commented on August 15, 2024

I'm still not sure about this. I understand that it does look weird to report "success", even though the action did not do anything. Previously, GH actions had a "neutral exit", which would be correct in this case, but they never introduced an alternative for the new actions (they said they will, but that was almost half a year ago).

For now, I don't think that it would be helpful when e.g. CircleCI failed (unit tests failed) and the automerge-action also reports failure, because then 2 actions will be unsuccessful, when it's really only 1 issue that needs to be addressed (fix unit tests).

I could think about an option like MERGE_REPORT_FAILURE or so, but I'm still not convinced of the usefulness

from automerge-action.

pascalgn avatar pascalgn commented on August 15, 2024

It's a long time since there was some activity in this issue, so I will close it for now. If you have any new information or need any help, feel free to reopen it!

from automerge-action.

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.