Skip to content

Commit

Permalink
retrigger if id changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Aug 21, 2024
1 parent 22027a8 commit d6aab85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/resource/pr_automation_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (in *prAutomationTriggerResource) Update(ctx context.Context, req resource.
return
}

if !data.RetriggerKey.Equal(state.RetriggerKey) {
if !data.RetriggerKey.Equal(state.RetriggerKey) || !data.PrAutomationID.Equal(state.PrAutomationID) {
_, err := in.client.CreatePullRequest(
ctx,
data.PrAutomationID.ValueString(),
Expand Down
2 changes: 1 addition & 1 deletion internal/resource/stack_run_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (in *stackRunTriggerResource) Update(ctx context.Context, req resource.Upda
return
}

if !data.RetriggerKey.Equal(state.RetriggerKey) {
if !data.RetriggerKey.Equal(state.RetriggerKey) || !data.ID.Equal(state.ID) {
_, err := in.client.TriggerRun(
ctx,
data.ID.ValueString(),
Expand Down

0 comments on commit d6aab85

Please sign in to comment.