buildCompareUrl static method

String? buildCompareUrl(
  1. String? remoteUrl,
  2. String? baseRef,
  3. String? newRef,
  4. String filePath,
)

Builds a comparison URL for a file between two refs

Implementation

static String? buildCompareUrl(
  String? remoteUrl,
  String? baseRef,
  String? newRef,
  String filePath,
) {
  if (remoteUrl == null || baseRef == null || newRef == null) {
    return null;
  }
  final digest = sha256.convert(utf8.encode(filePath));
  return '$remoteUrl/compare/$baseRef..$newRef#diff-$digest';
}