The Hero 7 Black battery and Hero 8 Black battery are the same size, capacity.
Hero 7 Black battery works fine with Hero 8 Black.
However there is a new feature on Hero 8 Black, you can check battery information.
Hero 7 battery won't be recognized as an official battery. Hero 8 won't display battery information. (Battery percentage will show as normal)
If you don't mind this, you can use Hero 7 Black battery in Hero 8 Black.