Assuming that we have a QR decomposition of a matrix $A \in \mathbb{R}^{m \times n}$, $Q \in O(m)$ and $R \in \mathbb{R}^{m \times n}$ such that $A=QR$, where R is an upper triangular matrix.
Now the question is if we have a new matrix $\overline {A} = \begin{pmatrix} w^T \\A \end{pmatrix}$, where $w \in \mathbb{R}^n$. Then the question is. How can we build an orthogonal matrix $\overline{Q} \in O(m+1)$ from that such that $\overline {A} = \overline {Q} \overline {R}$ is another QR decomposition.
My idea was that
$\begin{pmatrix} 10-0 \\0 Q^{-1}\end{pmatrix}\begin{pmatrix} w^T \\A \end{pmatrix} = \begin{pmatrix} w^T \\R \end{pmatrix}$, so the question is equivalent to: How do we make a proper triangular matrix out of $ \begin{pmatrix} w^T \\R \end{pmatrix}$ by applying orthogonal matrices?
The matrix $$\tag{1} X=\begin{bmatrix}w^T\\R\end{bmatrix} $$ is upper Hessenberg. If $R\in\mathbb{R}^{n\times n}$, you can make (1) triangular by using $n$ Givens rotations (from left). Use the first Givens rotation to zero out the entry $(2,1)$ of $X$ by using row 1. Note that only rows 1 and 2 are modified. The next rotations acts on the rows 2 and 3 and zeroes out the entry (3,2). Continue this way on subsequent rows until the sub-diagonal entries are zero. This can update the QR factorisation using $O(n^2)$ operations.
See also the example here.