Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit617c465

Browse files
story645greglucas
andcommitted
pr from main: precommit check + action in pr_clean + instructions for fix in docs
Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
1 parent0b8bd96 commit617c465

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

‎.github/workflows/clean_pr.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,13 @@ jobs:
4545
printf 'Changes to the following files have no effect and should not be backported:\n%s\n' "$lib"
4646
exit 1
4747
fi
48+
-name:Check for branches opened against main
49+
if:github.ref_name == 'main'
50+
run:|
51+
<<<<<<< HEAD
52+
printf 'PR branch should not be named main. See https://matplotlib.org/devdocs/devel/development_workflow.html#make-a-new-feature-branch'
53+
exit 1
54+
=======
55+
printf 'PR branch should not be main. See https://matplotlib.org/devdocs/devel/development_workflow.html#make-a-new-feature-branch'
56+
exit 1
57+
>>>>>>> 34d8fc3847... precommit warns on main + failing action + instructions for fix in docs

‎.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ repos:
2323
-id:mixed-line-ending
2424
-id:name-tests-test
2525
args:["--pytest-test-first"]
26+
-id:no-commit-to-branch#default is master and main
2627
-id:trailing-whitespace
2728
exclude_types:[svg]
29+
2830
-repo:https://github.com/pycqa/flake8
2931
rev:6.0.0
3032
hooks:

‎doc/devel/development_workflow.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,16 @@ what the changes in the branch are for. For example ``add-ability-to-fly``, or
6363
git branch my-new-feature upstream/main
6464
git checkout my-new-feature
6565

66+
If you started making changes on your local ``main`` branch, you can convert the
67+
branch to a feature branch by renaming it::
68+
69+
git branch -m <newname>
70+
71+
6672
Generally, you will want to keep your feature branches on your public GitHub
6773
fork of Matplotlib. To do this, you ``git push`` this new branch up to your
68-
GitHub repo. Generally (if you followed the instructions in these pages, and by
69-
default), git will have a link to your fork of the GitHub repo, called
74+
GitHub repo. Generally,if you followed the instructions in these pages, and by
75+
default, git will have a link to your fork of the GitHub repo, called
7076
``origin``. You push up to your own fork with::
7177

7278
git push origin my-new-feature
@@ -79,6 +85,12 @@ In git >= 1.7 you can ensure that the link is correctly set by using the
7985
From now on git will know that ``my-new-feature`` is related to the
8086
``my-new-feature`` branch in the GitHub repo.
8187

88+
If you first opened the pull request from your ``main`` branch and then
89+
converted it to a feature branch, you will need to close the original pull
90+
request and open a new pull request from the renamed branch. See
91+
`Github: working with branches<https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#working-with-branches>`_.
92+
93+
8294
.. _edit-flow:
8395

8496
The editing workflow

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp