Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of GitHub Actions to Prevent Triggering During Draft Pull Requests #418

Open
ThomasSanson opened this issue Jul 14, 2023 · 0 comments

Comments

@ThomasSanson
Copy link
Sponsor Contributor

ThomasSanson commented Jul 14, 2023

Hello,

I have noticed that our GitHub Actions are currently being triggered even when pull requests are in draft mode. This may lead to an unnecessary usage of resources and potentially unwanted notifications.

I would like to propose that we update our GitHub Actions to prevent them from being triggered when pull requests are in draft mode. This could be achieved by adding a condition to our GitHub Actions workflows to check the status of the pull request.

Here is an example of how this could be implemented:

name: Workflow Name
...
jobs:
  build:
    if: '! github.event.pull_request.draft'
    runs-on: ubuntu-latest
...

In this example, the "build" job only runs if the pull request is not in draft mode.

I would be grateful to hear your thoughts on this proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant