Improve pull request command line instructions (#27778)
* Show checkout instructions also when there is no permission to push, for anyone who wants to locally test the changes. * First checkout the branch exactly as is, without immediately having to solve merge conflicts. Leave this to the merge step, since it's often convenient to test a change without worrying about this. * Use `git fetch -u`, so an existing local branch is updated when re-testing the same pull request. But not the more risky `git fetch -f` in to handle force pushes, as we don't want to accidentally overwrite important local changes. * Show different merge command depending on the chosen merge style, interactively updated.
This commit is contained in:
parent
1eae2aadae
commit
7a286e4753
4 changed files with 47 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
|||
<script>
|
||||
import {SvgIcon} from '../svg.js';
|
||||
import {toggleElem} from '../utils/dom.js';
|
||||
|
||||
const {csrfToken, pageData} = window.config;
|
||||
|
||||
|
@ -39,6 +40,9 @@ export default {
|
|||
watch: {
|
||||
mergeStyle(val) {
|
||||
this.mergeStyleDetail = this.mergeForm.mergeStyles.find((e) => e.name === val);
|
||||
for (const elem of document.querySelectorAll('[data-pull-merge-style]')) {
|
||||
toggleElem(elem, elem.getAttribute('data-pull-merge-style') === val);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue