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 ability to limit or exclude vcs file list whilst building payload #150

Merged
merged 1 commit into from
Nov 16, 2019

Conversation

netwolfuk
Copy link
Member

This change includes the following new features:

  1. The list of changed VCS files can be disabled.
  2. The list of changed VCS files can be disabled if it is too large. The
    default value is 100 files across all changes in a build.

NOTE: In the cases where the change list is disabled or too large (1 & 2
above), the payload will contain a null files list.
This is preferable to returning an empty list, because the empty list
implies no actual changed files were included in the change.
A null change list will typically be serialised to nothing in JSON or
XML, so the json array or xml element will be missing from the payload.
If your endpoint is expecting these, then it should fail in this
scenario or handle the missing field gracefully.

Enables control over whether or not to include the list of files in a
change.
This can be enabled in the three ways below, in order of
priority.

  1. Add a 'param' named 'includeChangeFileList' to a webhook config by
    editing plugin-settings.xml
  2. Add a build parameter to a buildType or project called
    'webhook.includeChangeFileList'
  3. Define a property in teamcity's internal properties file called
    'webhook.includeChangeFileList'.

The value must be a string representation of a boolean. eg, "true" or
anything else will evaluate to false.

Enables control over the maximum number of files changed in a build
before the changed file list is null.
This can be controlled in the
three ways below, in order of priority.

  1. Add a 'param' named 'maxChangeFileListSize' to a webhook config by
    editing plugin-settings.xml
  2. Add a build parameter to a buildType or project called
    'webhook.maxChangeFileListSize'
  3. Define a property in teamcity's internal properties file called
    'webhook.maxChangeFileListSize'

If the total number of files is greater than maxChangeFileListSize,
then the change list will be null. See note above.

@netwolfuk
Copy link
Member Author

netwolfuk commented Nov 6, 2019

Relates to #150, #148 and #149

This change includes the following new features:
1. The list of changed VCS files can be disabled (0).
2. The list of changed VCS files can be disabled if it is too large. The
default value is 100 files across all changes in a build.
3. The list can be always include (old behaviour) when the value is set
negative (-1).

NOTE: In the cases where the change list is disabled or too large (1 & 2
above), the payload will contain a `null` files list.
This is preferable to returning an empty list, because the empty list
implies no actual changed files were included in the change.
A null change list will typically be serialised to nothing in JSON or
XML, so the json array or xml element will be missing from the payload.
If your endpoint is expecting these, then it should fail in this
scenario or handle the missing field gracefully.

**Enables control over the maximum number of files changed in a build
before the changed file list is null.** This can be controlled in the
three ways below, in order of priority.

1. Add a 'param' named 'maxChangeFileListSize' to a webhook config by
editing plugin-settings.xml
2. Add a build parameter to a buildType or project called
'webhook.maxChangeFileListSize'
3. Define a property in teamcity's internal properties file called
'webhook.maxChangeFileListSize'

If the total number of files is greater than `maxChangeFileListSize`,
then the change list will be null. See note above.
@netwolfuk netwolfuk force-pushed the issue_149-exclude_vcs_modification_resolution branch from ab527bb to 89c6500 Compare November 14, 2019 18:58
@netwolfuk netwolfuk merged commit 89c6500 into master Nov 16, 2019
@netwolfuk
Copy link
Member Author

Released

@netwolfuk netwolfuk deleted the issue_149-exclude_vcs_modification_resolution branch November 20, 2019 03:44
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.

1 participant