Skip to content

Add advice setting for pull request creation from forks - #1774

Open
be-student wants to merge 1 commit into
VirtusLab:developfrom
be-student:codex/1485-fork-warning-advice
Open

Add advice setting for pull request creation from forks#1774
be-student wants to merge 1 commit into
VirtusLab:developfrom
be-student:codex/1485-fork-warning-advice

Conversation

@be-student

Copy link
Copy Markdown
Contributor

Fixes #1485.

Add advice.macheteCreateFromFork, enabled by default, to suppress the repeated fork warning when set to false.
The shared creation path applies the setting to both github create-pr and gitlab create-mr; repository selection, remote checks, and PR/MR creation remain unchanged.
Document the setting in both commands, regenerate CLI help and the man page, and add a release note.

Validation:

  • Before the fix, both disabled-warning cases failed; default and explicitly enabled cases passed.
  • tox -e py -- tests/test_fork_advice.py tests/test_github_create_pr.py tests/test_gitlab_create_mr.py -n 2: 43 passed.
  • tox -e pep8,isort,mypy,py-docs: passed; mypy checked 112 source files.
  • tox -e sphinx-man,sphinx-html,py-docs-check: passed.
  • Repository shell checks passed after installing ShellCheck; the optional remark link check was skipped because remark is not installed.
  • Per AGENTS.md, flake8 and vulture are left to CI.

Tests use local Git repositories and the existing mocked hosting APIs, with complete command-output assertions for both providers and all three setting states.

Comment thread RELEASE_NOTES.md

## New in git-machete 3.45.1

- added: `advice.macheteCreateFromFork` git config key suppresses the fork warning in `github create-pr` and `gitlab create-mr` when set to `false`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks okay! pls rebase & resolve the conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an advice.* config key to disable not possible to cleanly create stacked PRs from forks warning

2 participants