jacekelgda / pr-troll

The troll that will challenge your PR
0 stars 0 forks source link

Trolling logic #12

Open jacekelgda opened 6 years ago

jacekelgda commented 6 years ago

This is the main logic of trolls. Trolls can fail or pass a builds of PR.

There are multiple trolls. Each with different trolling ability. Rules are characteristics of trolls https://github.com/jacekelgda/pr-troll/issues?q=is%3Aissue+is%3Aopen+label%3Arule .

There are two stages of trolling in each created PR.

First level per each PR decides if PR is going to be trolled ( Described in here #11 ). Depending on trolling level there will be a one in a x chance PR is going to be trolled.

Second level applies only for PRs that are trolled. There is a random troll assigned to the PR which should stick with it. Each PR update since assignment should have that troll.

Example:

  1. PR was created
  2. PR got trolled
  3. Random troll assignment - Refactor commit Troll
  4. PR build got crashed by the Refactor troll with explanation that refactor commit should be added to that PR.
  5. Refactor troll waits for PR update
  6. PR was updated
  7. Refactor troll found refactor commit in updated PR
  8. Troll passes the build for PR and goes away
jacekelgda commented 6 years ago

Apart from Trolls there are Leprechauns. They are good guys, not jerks like Trolls. They reward those who keep creating great things.