{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":532830962,"defaultBranch":"master","name":"fsm","ownerLogin":"venture-falcon","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-09-05T09:28:20.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/36480750?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1707120945.0","currentOid":""},"activityList":{"items":[{"before":"0dbdfc103b7ae6d6d2683e5101551cf030b9726d","after":null,"ref":"refs/heads/multi-gitter-branch","pushedAt":"2024-02-05T08:15:45.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"}},{"before":"8e3e043e8619184f736435865c90fcdf1d39a27a","after":"aa12b389ad0e8c0650868d28383ada5f5d6286c0","ref":"refs/heads/master","pushedAt":"2024-02-05T08:15:43.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"chore: Set CODEOWNERS (#7)","shortMessageHtmlLink":"chore: Set CODEOWNERS (#7)"}},{"before":null,"after":"0dbdfc103b7ae6d6d2683e5101551cf030b9726d","ref":"refs/heads/multi-gitter-branch","pushedAt":"2024-02-02T16:31:50.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"chore: Set CODEOWNERS","shortMessageHtmlLink":"chore: Set CODEOWNERS"}},{"before":"04a52141057de74959d7bd99aaf47659f3128d57","after":"8e3e043e8619184f736435865c90fcdf1d39a27a","ref":"refs/heads/master","pushedAt":"2023-10-04T15:19:08.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Update version in README.md","shortMessageHtmlLink":"Update version in README.md"}},{"before":"9b25c3b01c9a4058b868dc196ef5b64abb9f7464","after":null,"ref":"refs/heads/feat/no-action","pushedAt":"2023-10-04T15:11:33.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"}},{"before":"a00a219552d02cad9b27429e72aeb99f82d5e27d","after":"04a52141057de74959d7bd99aaf47659f3128d57","ref":"refs/heads/master","pushedAt":"2023-10-04T15:11:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Do not define actions to be executed inside the state machine (#6)\n\nDo not define actions to be executed inside the state machine, instead (optionally) set the action to be done on the call site.\r\n\r\nThis has several advantages:\r\n- The API within the library becomes much smaller and there is less code to maintain\r\n- The user of the library can decide if and how to execute certain action on state transitions, which also give a greater freedom on how process and map return types, or what the return types should be. This is stark contrast to the current API where all actions must always process the same type, and may never return a value.\r\n- Supporting both suspending functions and non suspending functions is now trivial\r\n\r\nSome addition changes that worth to mention:\r\n- Interceptors defined within the state machine is now removed, since this can quite easily, and with more freedom, be built on top of the existing API offered by this library\r\n- A method to get the accepted events for a given state is added to the StateMachine, this can be useful when you want to provide a user with what given actions are legal in the current state of an entity.\r\n\r\nHere is an example of how the functionality _could_ be extended in a service where fsm is used:\r\n```kotlin\r\n// Since this method is inline, it doesn't matter if \"action\" is suspending or not\r\ninline fun StateMachine.onEvent(\r\n state: S,\r\n event: E,\r\n action: (state: S) -> T\r\n): T {\r\n return when (val transition = onEvent(state, event)) {\r\n is Accepted -> {\r\n fsmLog.info { \"Transitioned from state $state to ${transition.state} due to event $event\" }\r\n action(transition.state)\r\n }\r\n Rejected -> throw InvalidStateException(state, event)\r\n }\r\n}\r\n```\r\n\r\nCreating custom extension methods like this on top of the now simplified API provides much more powerful and flexible conditions for interacting with the state machine.","shortMessageHtmlLink":"Do not define actions to be executed inside the state machine (#6)"}},{"before":"01b34ac915551dc3d3106c570ded3085f169d5fc","after":"9b25c3b01c9a4058b868dc196ef5b64abb9f7464","ref":"refs/heads/feat/no-action","pushedAt":"2023-06-16T09:19:36.870Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Return Set instead of List from acceptedEvents","shortMessageHtmlLink":"Return Set instead of List from acceptedEvents"}},{"before":"35f05c0011ef3ce54ee525e3e05fbe62c3e5bf05","after":"01b34ac915551dc3d3106c570ded3085f169d5fc","ref":"refs/heads/feat/no-action","pushedAt":"2023-06-16T09:15:44.306Z","pushType":"push","commitsCount":2,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Add method acceptedEvents\n\nAdd method acceptedEventes to StateMachine and StateMachineImple, which\nreturns the permitted events in a certain state according to the state\nmachine.","shortMessageHtmlLink":"Add method acceptedEvents"}},{"before":"3a1ab3a259e98c99f4efbc84a9724e06876f9346","after":"35f05c0011ef3ce54ee525e3e05fbe62c3e5bf05","ref":"refs/heads/feat/no-action","pushedAt":"2023-05-30T06:40:06.505Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Remove onEvent action lambda argument","shortMessageHtmlLink":"Remove onEvent action lambda argument"}},{"before":"e65574b3f0bc0840037da1aa8b53758b23662a35","after":"3a1ab3a259e98c99f4efbc84a9724e06876f9346","ref":"refs/heads/feat/no-action","pushedAt":"2023-05-19T23:18:19.489Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Remove old StateMachineBuilder code","shortMessageHtmlLink":"Remove old StateMachineBuilder code"}},{"before":"1bdf0215a6e472302c8237421f5e6da47cbb9cac","after":"e65574b3f0bc0840037da1aa8b53758b23662a35","ref":"refs/heads/feat/no-action","pushedAt":"2023-05-19T23:03:24.350Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Make API simpler and more extendable","shortMessageHtmlLink":"Make API simpler and more extendable"}},{"before":null,"after":"1bdf0215a6e472302c8237421f5e6da47cbb9cac","ref":"refs/heads/feat/no-action","pushedAt":"2023-05-19T14:20:26.887Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Separate actions from the state machine","shortMessageHtmlLink":"Separate actions from the state machine"}},{"before":"c1ffae9288d8df3fb11f400c64c7e278c6b4203b","after":"e6dc3422f0d4e422f65a720e424a80a01ae1482d","ref":"refs/heads/feat-coroutine-support2","pushedAt":"2023-05-19T12:29:49.085Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Revert \"Update version of kotlinx-coroutines-test\"\n\nThis reverts commit c1ffae9288d8df3fb11f400c64c7e278c6b4203b.","shortMessageHtmlLink":"Revert \"Update version of kotlinx-coroutines-test\""}},{"before":"929f760651f2e6ea2c51f80277a8812d3295bf31","after":"c1ffae9288d8df3fb11f400c64c7e278c6b4203b","ref":"refs/heads/feat-coroutine-support2","pushedAt":"2023-05-19T12:14:28.241Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Update version of kotlinx-coroutines-test","shortMessageHtmlLink":"Update version of kotlinx-coroutines-test"}},{"before":"c450d9c1a32c913a14cbb5e21e8dedeefea35415","after":"929f760651f2e6ea2c51f80277a8812d3295bf31","ref":"refs/heads/feat-coroutine-support2","pushedAt":"2023-04-27T10:11:05.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Remove library kotlin coroutines","shortMessageHtmlLink":"Remove library kotlin coroutines"}},{"before":"4d50a815e4569f9987eedfa2106389e2db023065","after":"c450d9c1a32c913a14cbb5e21e8dedeefea35415","ref":"refs/heads/feat-coroutine-support2","pushedAt":"2023-04-27T10:10:17.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Add test for function references","shortMessageHtmlLink":"Add test for function references"}},{"before":"fd4c5dd58cf4d0a9af635447638552749960dbdb","after":"4d50a815e4569f9987eedfa2106389e2db023065","ref":"refs/heads/feat-coroutine-support2","pushedAt":"2023-04-27T10:02:09.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Remove import","shortMessageHtmlLink":"Remove import"}},{"before":"63fd0e549704548ffbf6bd0329313264dfd91054","after":"fd4c5dd58cf4d0a9af635447638552749960dbdb","ref":"refs/heads/feat-coroutine-support2","pushedAt":"2023-04-27T10:00:45.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Delete redundant file","shortMessageHtmlLink":"Delete redundant file"}},{"before":null,"after":"63fd0e549704548ffbf6bd0329313264dfd91054","ref":"refs/heads/feat-coroutine-support2","pushedAt":"2023-04-27T09:57:27.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Implement experimental support for coroutines\n\nThis is done by changing onEvent to be a suspend method. It breaks the\nAPI but has minimal impact on the overall implementation of the\nstate machine.","shortMessageHtmlLink":"Implement experimental support for coroutines"}},{"before":null,"after":"cf00f34699516036c832e52026fefb790da4a29d","ref":"refs/heads/feat-coroutine-support","pushedAt":"2023-04-26T22:33:18.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"mantono","name":"Anton Österberg","path":"/mantono","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7093365?s=80&v=4"},"commit":{"message":"Implement experimental support for coroutines","shortMessageHtmlLink":"Implement experimental support for coroutines"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAD8gNTaQA","startCursor":null,"endCursor":null}},"title":"Activity · venture-falcon/fsm"}