Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ACR: Add Pull Request Event to Task Source Trigger #7526
ACR: Add Pull Request Event to Task Source Trigger #7526
Changes from 21 commits
1accdca
20866b9
6b87f94
bdfd98d
b0b3d46
94d0527
d2ddfb2
7ff22c2
1eb7626
4961413
a998801
d95e1ce
dbd7ced
e40a2a5
4cf68da
c7f2f56
e1def2d
1e1b43e
f1a3804
41432b6
7abc6f5
6005917
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: _update_trigger_event_list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event list is not always updated. If a user calls task update for reasons other than changing the status of
commit-trigger-enabled
orpull-request-trigger-enabled
then the event list is not updated, but retrieved as is from server.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, I was under the impression that this one can also be called by the create method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also relates to the above question. Is it possible that
source_trigger_events
is not empty (so you are clearing it) butstatus
is disabled?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an edge case in the RP that checks if
source_trigger_events
is empty. During update, if the user disabled all events in a trigger and sends an emptysource_trigger_events
to the RP, then the RP overrides these events with those of the existing trigger.Therefore, a disabled trigger event list may be "empty" to the client it is not to the server (though the trigger is still disabled). This
.clear()
is here because if a user is calling update again on a trigger that has been disabled, then we want to make sure none of the previously disabled events events are added back without the user knowing.