Skip to content

MkPullRequestGuidelines

Show source on GitHub

Node showing pull request guidelines.

Bases: MkTemplate

__init__

__init__(**kwargs: Any)

Parameters:

Name Type Description Default
kwargs Any

Keyword arguments passed to parent

{}
graph TD
  94854583588448["mkpullrequestguidelines.MkPullRequestGuidelines"]
  94854582782240["mktemplate.MkTemplate"]
  94854582919984["mkcontainer.MkContainer"]
  94854582916880["mknode.MkNode"]
  94854582838576["node.Node"]
  140544995341632["builtins.object"]
  94854582782240 --> 94854583588448
  94854582919984 --> 94854582782240
  94854582916880 --> 94854582919984
  94854582838576 --> 94854582916880
  140544995341632 --> 94854582838576
/home/runner/work/mknodes/mknodes/mknodes/templatenodes/mkpullrequestguidelines/metadata.toml
[metadata]
name = "MkPullRequestGuidelines"
icon = "octicon:git-pull-request-24"
group = "documentation"

# [examples.regular]
# title = "Regular"
# jinja = """
# {{ mk.MkPullRequestGuidelines() }}
# """

[output.markdown]
template = """
Link to any related issue in the Pull Request message.

During the review, we recommend using fixups:

{{ "git commit --fixup=SHA # SHA of commit you want to fix" | MkCode }}

Once all the changes are approved, you can squash your commits:

{{ "git rebase -i --autosquash main" | MkCode }}

And force-push:

{{ "git push -f" | MkCode }}

If this seems all too complicated, you can push or force-push each new commit,
and we will squash them ourselves if needed, before merging.
"""
mknodes.templatenodes.mkpullrequestguidelines.MkPullRequestGuidelines
class MkPullRequestGuidelines(mktemplate.MkTemplate):
    """Node showing pull request guidelines."""

    ICON = "octicons/git-pull-request-24"

    def __init__(self, **kwargs: Any):
        """Constructor.

        Arguments:
            kwargs: Keyword arguments passed to parent
        """
        super().__init__(template="pullrequest_guidelines.jinja", **kwargs)