From first principles for a waveform repeating over a period Tp being a current rising from Ii to Ii+Id.
\begin{equation}
I_{RMS}=\sqrt{\frac{1}{Tp}\int_0^{Tp} (I_i+\frac{I_d.t}{Tp})².dt}
\end{equation}
\begin{equation}
=\sqrt{\frac{1}{Tp}\int_0^{Tp} (I_i^2+\frac{2.I_i.I_d.t}{Tp}+\frac{I_d².t^2}{Tp²}).dt}
\end{equation}
\begin{equation}
=\sqrt {\frac{1}{Tp}(I_i^2.t+\frac{I_i.I_d.t^2}{Tp}+\frac{I_d².t^3}{3Tp²})_{t=0}^{t=Tp}}
\end{equation}
\begin{equation}
=\sqrt{ \frac{1}{Tp}(I_i^2.Tp+\frac{I_i.I_d.Tp^2}{Tp}+\frac{I_d².Tp^3}{3Tp²})}
\end{equation}
\begin{equation}
I_{RMS}=\sqrt {I_i^2+I_i.I_d+\frac{I_d²}{3}}
\end{equation}
If instead you consider this to be a ramp rising from i1 to i2 substitute i1 for Ii and i2-i1 for Id and you get
\begin{equation}
I_{RMS}=\sqrt {i1^2+i1.(i2-i1)+\frac{(i2-i1)^2}{3}}
\end{equation}
\begin{equation}
=\sqrt {i1.i2+\frac{(i2^2-2i1.i2+i1^2)}{3}}
\end{equation}
\begin{equation}
=\sqrt {\frac{(i2^2+i1.i2+i1^2)}{3}}
\end{equation}
This is independent of time and i1 and i2 are interchangable so where you have a ramp going from i1 to i2 and then back to i1 in one period this is your result and it is independent of duty cycle.
Now you need to average the result from above out over time.
To average two different RMS currents over a longer period (clue one of these can be zero).
Say we have Irms1 for t1 and Irms2 for t2.
\begin{equation}
I_{RMS}=\sqrt{\frac{I_{RMS1}^2.t_1+I_{RMS2}^2.t_2}{t1+t2}}
\end{equation}
So where you have a ramp going from i1 to i2 for t1 and no current for t2 we get.
\begin{equation}
I_{RMS}=\sqrt {\frac{t1}{t1+t2}.\frac{(i2^2+i1.i2+i1^2)}{3}}
\end{equation}