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

Add automation run created and any run change event trigger support #177

Merged
merged 12 commits into from
Sep 9, 2024

Conversation

pazhersh
Copy link
Collaborator

Description

What - Add support for the upcoming "run created" and "any run change" automation event types
How - Added the relevant models and schemas to support creating such actions

Type of change

Please leave one option from the following and delete the rest:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Non-breaking change (fix of existing functionality that will not change current behavior)
  • Documentation (added/updated documentation)

Copy link
Contributor

@Tankilevitch Tankilevitch left a comment

Choose a reason for hiding this comment

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

Nice looks very clean :)

Comment on lines 302 to 312
type RunCreatedEvent struct {
ActionIdentifier types.String `tfsdk:"action_identifier"`
}

type RunUpdatedEvent struct {
ActionIdentifier types.String `tfsdk:"action_identifier"`
}

type AnyRunChangeEvent struct {
ActionIdentifier types.String `tfsdk:"action_identifier"`
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
type RunCreatedEvent struct {
ActionIdentifier types.String `tfsdk:"action_identifier"`
}
type RunUpdatedEvent struct {
ActionIdentifier types.String `tfsdk:"action_identifier"`
}
type AnyRunChangeEvent struct {
ActionIdentifier types.String `tfsdk:"action_identifier"`
}
type ActionEvent struct {
ActionIdentifier types.String `tfsdk:"action_identifier"`
}
type RunCreatedEvent struct {
ActionEvent
}
type RunUpdatedEvent struct {
ActionEvent
}
type AnyRunChangeEvent struct {
ActionEvent
}

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe the same can be assigned to Entity<action>EventModel ?

Copy link
Contributor

Choose a reason for hiding this comment

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

plase add one import state test as well

@pazhersh pazhersh marked this pull request as draft September 8, 2024 11:37
@pazhersh pazhersh marked this pull request as ready for review September 8, 2024 11:37
Copy link
Contributor

@Tankilevitch Tankilevitch left a comment

Choose a reason for hiding this comment

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

LGTM

@pazhersh pazhersh merged commit f2571a4 into main Sep 9, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants