Giter Site home page Giter Site logo

Comments (3)

ramonmulia avatar ramonmulia commented on June 12, 2024

@simoneb After after diving into the issue I wasn't able to reproduce it.

It could be a race condition but no reason to skip the build step Required status check "build" is in progress.

The pull_request event triggers when a PR event occurs targeting the branches specified in the workflow and
push event is triggered whenever a commit is pushed to the specified branches.

Since a PR merge is just a commit pushed to the target branch it will trigger push events,
I believe it could listen just push events instead of both (pull_request and push), as this action will get just dependabot PRs to process skipping those that aren't.

what do you think?

from github-action-merge-dependabot.

simoneb avatar simoneb commented on June 12, 2024

Hi Ramon, I believe the solution is to simply restrict which push and pull_request events trigger the workflow.

Usually we want a CI workflow to run:

  • on pull requests: whenever a PR is opened or new commits are pushed to it. I think this required the pull_request event
  • on pushes to master: this requires the push event, but it can be restricted to only pushes to master

from github-action-merge-dependabot.

ramonmulia avatar ramonmulia commented on June 12, 2024

Hey @simoneb, after some tests, I can point out the following scenarios:


on:
  

    pull_request:
        types: [opened, edited]
    push: 
	branches:
		- ‘master’
  • It will trigger pull_request while creating a new PR, but if you commit something afterwards it will not dispatch the action again.
  • The edited type is when you edit something into PR like description not when you commit something.

This way it will run only the first time you create the PR (and when you edit something into it) but NOT for new PR commits and also when it is merged to master.

on:
  push: 

It will work in all scenarios.

  • When you create a new PR
  • When you commit in the PR
  • When merged to master or any branch

I mean, we don’t need to specify pull_request if we want this runs when the PR is opened, but we need to specify push for new commits

from github-action-merge-dependabot.

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.