I have some questions about the functoriality of (co)limits in $\infty$-categories, say in the framework of Lurie's Higher Topos Theory.
From the general stuff about Kan-extensions (HTT 4.3.2.6) follows that taking the colimit gives a functor $\operatorname{Map}(\mathcal{C}, \mathcal{D}) \to \operatorname{Map}(\mathcal{C}^\rhd, \mathcal{D})$.
But it seems to me that what one actually wants is something stronger that also takes into account maps between the diagram categories.
More precisely my questions are as follows:


1. Where this came up is the following situation: I have two functors $f, f' \colon \mathcal I \to \mathcal J$ between (small) ordinary categories, a natural transformation $\eta \colon f \Rightarrow f'$, and a diagram $D \colon \mathcal J \to \mathcal C$ in a cocomplete $\infty$-category $\mathcal C$.
Is then $f'\_\* \circ (D \circ \eta)\_\*$ homotopic to $f\_\*$ as maps $\operatorname{colim}\_{\mathcal I} (D \circ f) \to \operatorname{colim}\_{\mathcal J} D$?
2. The above seems like it should be a small part of a much more general statement. Namely that there is a functor $(\mathbf{Cat}\_\infty)\_{/\mathcal{C}} \to \mathcal{C}$ given by taking the colimit (or something more sophisticated also taking into account the cones), where we consider $\mathbf{Cat}\_\infty$ as an $(\infty, 2)$-category such that $(\mathbf{Cat}\_\infty)\_{/\mathcal{C}}$ becomes an $(\infty, 1)$-category (here we probably need to be a little careful in which direction the 2-cells are pointing, which should depend on whether we are looking at colimits or limits).


Do these statements make sense and if so, are they true?
Furthermore, are they implied by statements in HTT?
I tried to look through the book, but the only thing I found that relates to these questions is 4.2.2.7 and I don't see how to extract statements as above from this.


**EDIT**: As noted by Dylan Wilson in the comments 2. is part of a paper by Mazel-Gee. However, I don't see how that version of the statement implies 1. since it seems to me that the diagram corresponding to 1. does not commute in Mazel-Gee's $\mathcal Lax(\mathcal C)$ which is the domain of the global colimit functor for $\mathcal C$ constructed there.



Functoriality of (co)limits in $\infty$-categories
Here is a proof of 1, which applies in any 2-category. We'll be thinking of the 2-category of quasicategories, which has homs from $Q$ to $R$ the homotopy category of the mapping quasicategory $R^Q$. With apologies for changing your notation, it would have gotten messy otherwise; I've tried to explain the connection between our notations below. The fact that these 2-categorical constructions agree with the definitions in *Higher Topos Theory* is proved in Riehl and Verity's work, see for instance [here](https://arxiv.org/pdf/1306.5144.pdf) or their book draft.


Let $A,B,C,D,E,F$ be small quasicategories, and consider a pseudo-commutative square 
\begin{matrix} A&\stackrel{f}{\to}&B\\
\downarrow \scriptstyle{g}&\stackrel{\alpha}{\Leftarrow}&\downarrow \scriptstyle{h}\\
C&\stackrel{k}{\to}&D\\
\downarrow \scriptstyle{l}&\stackrel{\beta}{\Leftarrow}&\downarrow \scriptstyle{m}\\
E&\stackrel{n}{\to}&F\end{matrix}
in the 2-category of small quasicategories. So $\alpha$ is a homotopy class of natural isomorphisms $hf\to kg$, and similarly for $\beta$. Let $Q$ be a cocomplete quasicategory, and denote by $f^\*:Q^B\to Q^A$ the restriction functor along $f$, and by $f\_!:Q^A\to Q^B$ the left Kan extension functor along $f$. 


The 2-morphisms $\alpha$ and $\beta$ induce 2-morphisms $\alpha^\*:f^\*h^\*\to g^\*k^\*$ and similarly, $\beta^\*$. Finally, the latter 2-morphisms have *mates* $\alpha\_!:g\_!f^\*\to k^\*h\_!$ defined as in Appendix A [here](https://www.math.ru.nl/~mgroth/preprints/GPS_mayer.pdf) by pasting with the unit of the adjunction $g\_!\vdash g^\*$ and the counit of the adjunction $h\_!\vdash h^\*$. The key result here is that taking mates commutes with pasting: if we denote by $\beta\*\alpha$ the transformation in the pasted square
\begin{matrix} A&\stackrel{f}{\to}&B\\
\downarrow \scriptstyle{lg}&\stackrel{\beta\*\alpha}{\Leftarrow}&\downarrow \scriptstyle{mh}\\
E&\stackrel{n}{\to}&F\end{matrix}
then we have $(\beta \*\alpha)\_!=\beta\_!\*\alpha\_!$. This is a result that holds in any 2-category, as it follows formally from the triangle identities of the relevant adjunctions. So we're not really using any $\infty$-category theory here.


Now, this applies to your question if we set $C=A,D=B,E=F=\Delta^0,g=\mathrm{id}\_A,$ and $h=\mathrm{id}\_B$. Then $l,m,n,$ and $\beta$ are uniquely determined since $\Delta^0$ is terminal. So we are given the following data:
\begin{matrix} A&\stackrel{f}{\to}&B\\
||&\stackrel{\alpha}{\Leftarrow}&||\\
A&\stackrel{k}{\to}&B\\
\downarrow \scriptstyle{l}&\stackrel{\mathrm{id}\_{mk}}{\Leftarrow}&\downarrow \scriptstyle{m}\\
\Delta^0&=&\Delta^0\end{matrix}
Now, the terminality of $\Delta\_0$ again implies that the pasted natural transformation $\mathrm{id}\_l\*\alpha=\mathrm{id}\_l$. Thus in the square
\begin{matrix} 
Q^A&\stackrel{f^\*}{\to}&Q^B\\
\downarrow \scriptstyle{l\_!}&\Leftarrow&\downarrow \scriptstyle{m\_!}\\
Q&=&Q\end{matrix}
we may equivalently take the central 2-morphism to be $(\mathrm{id}\_{mk}\*\alpha)\_!=(\mathrm{id}\_{mk})\_!\*\alpha\_!$ or $(\mathrm{id}\_{mf})\_!$.


Finally, observe that $m\_!$ and $l\_!$ are the respectively colimit functors, so these equal transformations have the domain and codomain you want (your $f$ is my $f$.) I claim that what I denote $(\mathrm{id}\_{mf})\_!$ is identified with what you denote simply $f\_\*$. While I don't know what definition of $f\_\*$ you're using, this should be clear from the definition of $(\mathrm{id}\_{mf})\_!$ as the composite
$$\mathrm{colim}\_B(D\circ f)\to \mathrm{colim}\_B((\Delta\_A\mathrm{colim}\_A D)\circ f)=\mathrm{colim}\_B\Delta\_B \mathrm{colim}\_A D\to \mathrm{colim}\_A D$$
which is precisely the definition of the mate. Similarly, $\alpha\_!$ is what you would denote $(D\circ \alpha)\_\*$. 


