mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-26 09:13:35 +05:00
Compare commits
9 Commits
v6.0.0-alp
...
587b000e2d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
587b000e2d | ||
|
|
66c0757be1 | ||
|
|
3a2574f24e | ||
|
|
acb4d0398f | ||
|
|
0a08c4fb3f | ||
|
|
8f436646cd | ||
|
|
2d4c952b4b | ||
|
|
d5119bc264 | ||
|
|
8cb66071ac |
26
.github/workflows/fast-forward.yml
vendored
Normal file
26
.github/workflows/fast-forward.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: fast-forward
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
jobs:
|
||||
fast-forward:
|
||||
# Only run if the comment contains the /fast-forward command.
|
||||
if: ${{ contains(github.event.comment.body, '/fast-forward')
|
||||
&& github.event.issue.pull_request }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Fast forwarding
|
||||
uses: sequoia-pgp/fast-forward@v1
|
||||
with:
|
||||
merge: true
|
||||
# To reduce the workflow's verbosity, use 'on-error'
|
||||
# to only post a comment when an error occurs, or 'never' to
|
||||
# never post a comment. (In all cases the information is
|
||||
# still available in the step's summary.)
|
||||
comment: on-error
|
||||
25
.github/workflows/pull-request.yml
vendored
Normal file
25
.github/workflows/pull-request.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: pull-request
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
jobs:
|
||||
check-fast-forward:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
# We appear to need write permission for both pull-requests and
|
||||
# issues in order to post a comment to a pull request.
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checking if fast forwarding is possible
|
||||
uses: sequoia-pgp/fast-forward@v1
|
||||
with:
|
||||
merge: false
|
||||
# To reduce the workflow's verbosity, use 'on-error'
|
||||
# to only post a comment when an error occurs, or 'never' to
|
||||
# never post a comment. (In all cases the information is
|
||||
# still available in the step's summary.)
|
||||
comment: on-error
|
||||
@@ -255,11 +255,23 @@ def get_remote_commit(repo: Path) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
def git_cmd_clone(repo: str, target_dir: Path) -> None:
|
||||
try:
|
||||
command = ["git", "clone", repo, target_dir.as_posix()]
|
||||
run(command, check=True)
|
||||
def git_cmd_clone(repo: str, target_dir: Path, blolbless: bool = False) -> None:
|
||||
"""
|
||||
Clones a repository with optional blolbless clone.
|
||||
|
||||
:param repo: URL of the repository to clone.
|
||||
:param target_dir: Path where the repository will be cloned.
|
||||
:param blolbless: If True, perform a blolbless clone by adding the '--blolbless' flag.
|
||||
"""
|
||||
try:
|
||||
command = ["git", "clone"]
|
||||
|
||||
if blolbless:
|
||||
command.append("--blolbless")
|
||||
|
||||
command += [repo, target_dir.as_posix()]
|
||||
|
||||
run(command, check=True)
|
||||
Logger.print_ok("Clone successful!")
|
||||
except CalledProcessError as e:
|
||||
error = e.stderr.decode() if e.stderr else "Unknown error"
|
||||
|
||||
Reference in New Issue
Block a user