Giter Club home page Giter Club logo

Comments (7)

pascalgn avatar pascalgn commented on August 15, 2024

In merge.js there's the line logger.info("PR successfully merged!");, maybe that helps?

from automerge-action.

Cyberbeni avatar Cyberbeni commented on August 15, 2024

Can you use the log for other actions?

I meant the @actions/core.setOutput function: https://github.com/actions/cache/blob/3d01b4eb53c7cbc3df0c28cb47cc45754127fe57/src/utils/actionUtils.ts#L58

from automerge-action.

pascalgn avatar pascalgn commented on August 15, 2024

Ah, I didn't know that existed. Yes, sounds like a good idea.

I had a look at the documentation and found https://help.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#outputs

So the action should define some output ID. Do you have any opinions on how the output should look like? I can think of result: merged and merged: true from the top of my head. I'm not sure what makes more sense for other actions to consume

from automerge-action.

Cyberbeni avatar Cyberbeni commented on August 15, 2024

People could be using checks that just reports on the pull request and doesn't run in their workflows, like code quality checking, so having a result with merged/merge_blocked/other values would probably be the best in my opinion.

from automerge-action.

pascalgn avatar pascalgn commented on August 15, 2024

I think it's a bit more complicated, because the action has different result types, based on the event that triggered it:

  • push: not sure if anyone is really using it, but in theory this will affect multiple branches/PRs
  • status: GH reports status results per commit, so this action can affect multiple branches/PRs
  • pull_request, pull_request_review: these events are triggered per PR, so will only affect a single branch/PR

The output name needs to be fixed and as far as I can tell, GH only supports strings, no complex objects, as outputs. But in the case of multiple affected PRs, we would need something like { "PR#123": "merged", "PR#456": "merge_blocked" }

from automerge-action.

pascalgn avatar pascalgn commented on August 15, 2024

I think this is useful, but I don't need this at the moment and I don't see myself implementing this anytime soon. However, feel very free to work on this and if you create a PR for it, I will have a look at it in a timely manner!

I will close this issue for now. If you have any new information or need any help, feel free to reopen it!

from automerge-action.

ZacSweers avatar ZacSweers commented on August 15, 2024

what about something via env?

echo "::set-env name=MERGE_SUCCESS::true"

Then downstream steps could check that?

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.