mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-22 17:48:23 +08:00
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:

committed by
GitHub

parent
1eae2aadae
commit
7a286e4753
@ -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() {
|
||||
|
Reference in New Issue
Block a user