Zum Hauptinhalt springen

getReleaseRole

const getReleaseRole: (releaseUser, returnTemporaryReleaseRoleIfSet?) => cfgReleaseRole

Retrieve the release role for the given releaseUser.

  1. It looks for the release employee file of the releaseUser.
  2. If no release employee file is found, an error is thrown.
  3. If a employee file is found, it looks for a temporal release role.
  4. If a temporal release role is active and returnTemporaryReleaseRoleIfSet is true, it uses the temporal release role. If a date-range is provided, it checks if the current date is between the date-range.
  5. It looks for the release role.
  6. If no release role is found, an error is thrown.
  7. It returns the release role.

Parameters

releaseUser

string

The release user for which the release role should be found

returnTemporaryReleaseRoleIfSet?

boolean

If true, the temporal release role is returned if active

Returns

cfgReleaseRole

The release role