Skip to content

🤖 Github action to ensure that test are added to a project for new features or bug fixes

License

Notifications You must be signed in to change notification settings

Slashgear/flo-du-bot

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Welcome to flo-du-bot Github Action👋

License: MIT Twitter: Slashgear_ Continous Integration

Github action to ensure that test are added to a project for new features or bug fixes.

By default, when a pull request is opened and is name contains feat or fix, the action will fail if the list of files changes does not match

Context of this action

With my colleague Florent Dubost, we try to instill in our development teams the need to always try to implement automated tests in the Pull Requests on which they modify the product of our tools.

This is part of our "team rules" that we try to respect.

As we presented in the article in french "How not to throw away a frontend application every two years?, we always try to automate our team rules so that they don't rely on people who are then the guarantor of the respect of these rules.

Also explained in this video conference in french. youtube video screenshot

With my colleague Mickaël Alves, we took advantage of an R&D day to implement the rule "Always add/modify tests when we make a fix or develop a new feature" that Florent was making sure we respected but with a Github action. This is why we named the project flo-du-bot, linked to the name of the person who inspired this idea.

Usage

This action allows you to include a title check of a pull request automatically. This action only works on pull_request events. Add this action on your pull request event workflows.

steps:
  - uses: Slashgear/flo-du-bot@v1.0.0
    with:
      prTitlePattern: "(feat|fix)" # Regexp the title should match. (default)
      testFileExtensionPattern: "(spec.js|int.js|.feature|test.js)" # Regexp of modified files extensions (default)
      sourceFilePattern: "src/.*.(js|ts)" # Regexp of source files edition detection. (default)
      reviewEvent: "REQUEST_CHANGES" # Type of event triggered by the bot in the pullRequest (default) other values: COMMENT for review status comment, NONE if you don't want it to touch your PR reviews
      token: $ # Github token used (you could pass ${{ secrets.GITHUB_TOKEN }})

Author

👤 Slashgear

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Slashgear.
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

About

🤖 Github action to ensure that test are added to a project for new features or bug fixes

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks