Skip to content

Conversation

@leplatrem
Copy link
Contributor

@leplatrem leplatrem commented Sep 1, 2022

By removing the inheritance between the two actions, we pave the way for #77 and the resulting create/update/update workflows, although they have some duplicate bits, can be read from top to bottom.

@leplatrem leplatrem requested a review from a team as a code owner September 1, 2022 11:22
Copy link
Contributor

@bsieber-mozilla bsieber-mozilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the chaining of the "maybe" operations, I think of these as (Conditions+Process) in one method (and these "maybe" operations could chained in the yaml to configure a pipeline?).

Let's land this then continue to iterate on naming and design?

@leplatrem leplatrem merged commit 15b214b into 213-split-default-action-into-functions Sep 6, 2022
@leplatrem leplatrem deleted the 213-remove-class-inheritance branch September 6, 2022 10:01
leplatrem added a commit that referenced this pull request Oct 5, 2022
…#236, #253) (#232)

* Extract create and update issue

* Remove client as action attributes

* Remove useless code

* Extract add comment

* Remove indirection with comments for changes

* Instantiate context in __call__ instead of each method

* Remove usage of self in _update_issue()

* Split default with status and assignee into smaller bits

* Rename create_comment()

* Remove class inheritance between default and default with status and assignee (ref #77) (#233)

* Move helpers to jbi.services.jira and bugzilla

* Move bugzilla out of jira module

* Add type annotations

* Update code comment about bug.comment

* Chain operations instead of using nested conditions (with `:=` operators) (#236)

* Rename ActionLogContext to ActionContext

* Rename log_context to context

* Remove := operator and chain operations

* Remove the maybe_ from services.jira

* Align signatures of action functions

* Do not duplicate parameters between init and call

* Runner now instantiates context

* Pass actions contexts to action tests

* Update actions docs

* Remove redundant parameters

* Adjust parameters between default.py and jira.py

* Inherit JiraContext from Context

* Remove useless and confusing condition

* Replace repetitive calls with list of steps

* Let the runner set the ActionContext operation

* Reintroduce maybe_ for optional steps

* Load default action steps from configuration (#253)

* Move steps to jbi.actions.steps

* Rename test_default to test_steps

* Move test_default_with_assignee_and_status into test_steps

* Load default action steps from configuration

* Add tests for the default action behaviour

* Rename groups of steps. create -> new, update -> existing

* Remove default value config/config.prod.yaml

Co-authored-by: bsieber-mozilla <[email protected]>

* Move remapping of steps into helper

* Remove useless pylint annotation

* Adjust docstrings

* Merge unspecified groups with default ones

* Update secrets baseline

Co-authored-by: bsieber-mozilla <[email protected]>

Co-authored-by: bsieber-mozilla <[email protected]>

Co-authored-by: bsieber-mozilla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants