diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a59fb53..c2d1f49 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,7 +19,6 @@ updates: versioning-strategy: "increase" labels: - "dependencies" - - "main" groups: symfony: applies-to: version-updates @@ -41,7 +40,6 @@ updates: update-types: ["version-update:semver-major", "version-update:semver-minor"] labels: - "dependencies" - - "stable32" groups: symfony: applies-to: version-updates @@ -63,7 +61,6 @@ updates: update-types: ["version-update:semver-major", "version-update:semver-minor"] labels: - "dependencies" - - "stable33" groups: symfony: applies-to: version-updates @@ -85,7 +82,27 @@ updates: update-types: ["version-update:semver-major", "version-update:semver-minor"] labels: - "dependencies" - - "stable34" + groups: + symfony: + applies-to: version-updates + patterns: + - "symfony/*" + +- package-ecosystem: composer + directory: "/" + target-branch: stable35 + schedule: + interval: "weekly" + open-pull-requests-limit: 20 + commit-message: + prefix: "build" + include: "scope" + versioning-strategy: "increase" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] + labels: + - "dependencies" groups: symfony: applies-to: version-updates diff --git a/.github/workflows/command-submodule-pr.yml b/.github/workflows/command-submodule-pr.yml new file mode 100644 index 0000000..cdebc1d --- /dev/null +++ b/.github/workflows/command-submodule-pr.yml @@ -0,0 +1,167 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT +name: Open submodule pull request + +on: + issue_comment: # zizmor: ignore[dangerous-triggers] + types: [created] + +permissions: + contents: read + +jobs: + init: + runs-on: ubuntu-latest + + # A consumer patch or repository variable configures the command. + if: github.event.issue.pull_request != '' && github.event.comment.body == '/libresign-pr' + + outputs: + head_ref: ${{ steps.comment-branch.outputs.head_ref }} + head_sha: ${{ steps.comment-branch.outputs.head_sha }} + base_ref: ${{ steps.comment-branch.outputs.base_ref }} + + steps: + - name: Get repository from pull request comment + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + id: get-repository + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const pull = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }); + + const repositoryName = pull.data.head?.repo?.full_name + console.log(repositoryName) + return repositoryName + + - name: Disabled on forks + if: ${{ fromJSON(steps.get-repository.outputs.result) != github.repository }} + run: | + echo 'Can not execute /server-pr on forks' + exit 1 + + - name: Check actor permission + uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0 + with: + require: write + + - name: Add reaction on start + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 + with: + token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] + repository: ${{ github.event.repository.full_name }} + comment-id: ${{ github.event.comment.id }} + reactions: '+1' + + - name: Init branch + uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0 + id: comment-branch + + - name: Add reaction on failure + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 + if: failure() + with: + token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] + repository: ${{ github.event.repository.full_name }} + comment-id: ${{ github.event.comment.id }} + reactions: '-1' + + process: + runs-on: ubuntu-latest + needs: init + + env: + TARGET_REPOSITORY: LibreSign/libresign + SUBMODULE_PATH: 3rdparty + HEAD_REF: ${{ needs.init.outputs.head_ref }} + HEAD_SHA: ${{ needs.init.outputs.head_sha }} + BASE_REF: ${{ needs.init.outputs.base_ref }} + PR_NUMBER: ${{ github.event.issue.number }} + PR_TITLE: ${{ github.event.issue.title }} + + steps: + - name: Validate target configuration + shell: bash + run: | + set -euo pipefail + [[ "$TARGET_REPOSITORY" =~ ^[[:alnum:]_.-]+/[[:alnum:]_.-]+$ ]] || exit 1 + [[ "$SUBMODULE_PATH" =~ ^[[:alnum:]_.-]+(/[[:alnum:]_.-]+)*$ ]] || exit 1 + + - name: Checkout 3rdparty ${{ needs.init.outputs.head_ref }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + path: source + persist-credentials: false + fetch-depth: 0 + ref: ${{ needs.init.outputs.head_sha }} + + - name: Set up php + uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 + with: + php-version: 8.3 + coverage: none + + - name: Generate composer diff + working-directory: source + run: | + composer global config --no-interaction allow-plugins.ion-bazan/composer-diff true + composer global require --no-interaction ion-bazan/composer-diff + { + echo "- [ ] $SUBMODULE_PATH: ${{ github.server_url }}/${{ github.repository }}/pull/$PR_NUMBER" + echo + composer diff --with-links --base "origin/$BASE_REF:composer.lock" --target composer.lock + } > "$RUNNER_TEMP/pr-body.md" + cat "$RUNNER_TEMP/pr-body.md" + + - name: Checkout target repository ${{ needs.init.outputs.base_ref }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: ${{ env.TARGET_REPOSITORY }} + path: parent + persist-credentials: false + ref: ${{ needs.init.outputs.base_ref }} + + - name: Fail if target branch already exists + working-directory: parent + run: | + if git ls-remote --exit-code --heads origin "refs/heads/$HEAD_REF"; then + echo "Branch $HEAD_REF already exists on $TARGET_REPOSITORY, not overwriting it" + exit 1 + fi + + - name: Setup git + working-directory: parent + run: | + git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com' + git config --local user.name 'github-actions[bot]' + + - name: Commit submodule reference + working-directory: parent + run: | + git checkout -b "$HEAD_REF" + git update-index --cacheinfo "160000,$HEAD_SHA,$SUBMODULE_PATH" + git commit --signoff -m "$(sed -E 's/^\[stable[0-9.]*\] *//' <<< "$PR_TITLE")" + - name: Push branch and create target pull request + env: + GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] + run: | + set -euo pipefail + gh auth setup-git + git -C parent push origin "$HEAD_REF" + url=$(gh pr create --repo "$TARGET_REPOSITORY" --base "$BASE_REF" --head "$HEAD_REF" \ + --title "$PR_TITLE" \ + --body-file "$RUNNER_TEMP/pr-body.md") + gh pr comment "$PR_NUMBER" --repo '${{ github.repository }}' --body "- Parent PR: $url" + + - name: Add reaction on failure + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 + if: failure() + with: + token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] + repository: '${{ github.event.repository.full_name }}' + comment-id: '${{ github.event.comment.id }}' + reactions: '-1' diff --git a/.github/workflows/command-submodule-pr.yml.patch b/.github/workflows/command-submodule-pr.yml.patch new file mode 100644 index 0000000..f38e25e --- /dev/null +++ b/.github/workflows/command-submodule-pr.yml.patch @@ -0,0 +1,22 @@ +--- a/.github/workflows/command-submodule-pr.yml ++++ b/.github/workflows/command-submodule-pr.yml +@@ -14,7 +14,7 @@ + runs-on: ubuntu-latest + + # A consumer patch or repository variable configures the command. ++ if: github.event.issue.pull_request != '' && github.event.comment.body == '/libresign-pr' +- if: github.event.issue.pull_request != '' && vars.SUBMODULE_PR_COMMAND != '' && github.event.comment.body == vars.SUBMODULE_PR_COMMAND + + outputs: + head_ref: ${{ steps.comment-branch.outputs.head_ref }} +@@ -75,8 +75,8 @@ + needs: init + + env: ++ TARGET_REPOSITORY: LibreSign/libresign ++ SUBMODULE_PATH: 3rdparty +- TARGET_REPOSITORY: ${{ vars.SUBMODULE_TARGET_REPOSITORY }} +- SUBMODULE_PATH: ${{ vars.SUBMODULE_PATH }} + HEAD_REF: ${{ needs.init.outputs.head_ref }} + HEAD_SHA: ${{ needs.init.outputs.head_sha }} + BASE_REF: ${{ needs.init.outputs.base_ref }} diff --git a/.github/workflows/composer-auto.yml b/.github/workflows/composer-auto.yml index e29a28c..e926950 100644 --- a/.github/workflows/composer-auto.yml +++ b/.github/workflows/composer-auto.yml @@ -74,7 +74,7 @@ jobs: - name: Checkout ${{ needs.init.outputs.head_ref }} uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - token: ${{ secrets.COMMAND_BOT_PAT }} + persist-credentials: false fetch-depth: 0 ref: ${{ needs.init.outputs.head_ref }} @@ -106,11 +106,19 @@ jobs: - name: Dump Autoload run: composer dump-autoload - - name: Commit and push amend + - name: Commit and push regenerated dependencies + env: + HEAD_REF: ${{ needs.init.outputs.head_ref }} + GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] run: | - git add . - git commit --signoff -m 'chore(autoloader): Dump autoloader' - git push --force origin '${{ needs.init.outputs.head_ref }}' + git add -A + if git diff --cached --quiet; then + echo 'No regenerated files changed' + exit 0 + fi + git -c core.hooksPath=/dev/null commit --signoff -m 'chore(autoloader): Regenerate scoped dependencies' + gh auth setup-git + git -c core.hooksPath=/dev/null push origin "HEAD:$HEAD_REF" - name: Add reaction on failure uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 diff --git a/.github/workflows/composer.yml b/.github/workflows/composer.yml index e050f6e..4eac055 100644 --- a/.github/workflows/composer.yml +++ b/.github/workflows/composer.yml @@ -4,7 +4,7 @@ on: pull_request: push: branches: - - master + - main - stable* permissions: diff --git a/.github/workflows/sync-workflow-templates.yml b/.github/workflows/sync-workflow-templates.yml new file mode 100644 index 0000000..7ec9b92 --- /dev/null +++ b/.github/workflows/sync-workflow-templates.yml @@ -0,0 +1,171 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/LibreCodeCoop/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + +# This workflow will update all workflow templates. +# Additionally it will reapply workflow.yml.patch files after syncing and only then commit the result. +# +# Authentication is selected explicitly with vars.WORKFLOW_SYNC_AUTH_MODE. +# See docs/cross-repository-automation.md for modes, credentials and GITHUB_TOKEN limitations. +name: Update workflows +on: + workflow_dispatch: + schedule: + - cron: "5 2 * * 0" + +permissions: + contents: read + +jobs: + dispatch: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + branches: + - ${{ github.event.repository.default_branch }} + + name: Update workflows in ${{ matrix.branches }} + + permissions: + contents: write + pull-requests: write + + env: + AUTH_MODE: ${{ vars.WORKFLOW_SYNC_AUTH_MODE || 'token' }} + + steps: + - name: Check actor permission + if: ${{ github.event_name == 'workflow_dispatch' }} + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + permission="$(gh api "repos/${GITHUB_REPOSITORY}/collaborators/${GITHUB_ACTOR}/permission" --jq '.permission')" + [[ "${permission}" == "admin" ]] || { + echo "::error::Manual workflow runs require repository admin permission; ${GITHUB_ACTOR} has ${permission}" + exit 1 + } + + - name: Validate workflow sync authentication + shell: bash + env: + APP_CLIENT_ID: ${{ vars.WORKFLOW_SYNC_APP_CLIENT_ID }} + APP_PRIVATE_KEY: ${{ secrets.WORKFLOW_SYNC_APP_PRIVATE_KEY }} + CONSUMER_TOKEN: ${{ secrets.WORKFLOW_SYNC_TOKEN }} + run: | + set -euo pipefail + + case "${AUTH_MODE}" in + github-app) + [[ -n "${APP_CLIENT_ID}" && -n "${APP_PRIVATE_KEY}" ]] || { + echo "::error::github-app requires WORKFLOW_SYNC_APP_CLIENT_ID and WORKFLOW_SYNC_APP_PRIVATE_KEY" + exit 1 + } + ;; + token) + [[ -n "${CONSUMER_TOKEN}" ]] || { + echo "::error::token mode requires WORKFLOW_SYNC_TOKEN" + exit 1 + } + ;; + github-token) + ;; + *) + echo "::error::Unsupported WORKFLOW_SYNC_AUTH_MODE: ${AUTH_MODE}" + exit 1 + ;; + esac + + - name: Create GitHub App token + if: ${{ env.AUTH_MODE == 'github-app' }} + id: workflow-app-token + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 + with: + client-id: ${{ vars.WORKFLOW_SYNC_APP_CLIENT_ID }} + private-key: ${{ secrets.WORKFLOW_SYNC_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: ${{ github.event.repository.name }} + permission-contents: write + permission-pull-requests: write + permission-workflows: write + + - name: Resolve workflow sync token + id: auth-token + shell: bash + env: + WORKFLOW_APP_TOKEN: ${{ steps.workflow-app-token.outputs.token }} + CONSUMER_TOKEN: ${{ secrets.WORKFLOW_SYNC_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + + case "${AUTH_MODE}" in + github-app) token="${WORKFLOW_APP_TOKEN}" ;; + token) token="${CONSUMER_TOKEN}" ;; + github-token) token="${GITHUB_TOKEN}" ;; + *) exit 1 ;; + esac + + [[ -n "${token}" ]] || { + echo "::error::Selected workflow sync authentication produced an empty token" + exit 1 + } + + echo "::add-mask::${token}" + echo "token=${token}" >> "${GITHUB_OUTPUT}" + + - name: Checkout workflow repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + path: source + repository: LibreCodeCoop/.github + + - name: Record workflow catalog revision + id: catalog-revision + working-directory: source + shell: bash + run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" + + - name: Checkout app + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + path: target + ref: ${{ matrix.branches }} + + - name: Synchronize workflow templates + id: sync + uses: ./source/actions/sync-workflows + with: + source: source/workflow-templates + target: target + catalog-commit: ${{ steps.catalog-revision.outputs.sha }} + + - name: Create Pull Request + if: ${{ steps.sync.outputs.changed == 'true' }} + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 + with: + token: ${{ steps.auth-token.outputs.token }} + commit-message: 'ci(actions): Update workflow templates from organization template repository' + committer: GitHub + author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + path: target + signoff: true + branch: 'automated/noid/${{ matrix.branches }}-update-workflows' + title: '[${{ matrix.branches }}] ci(actions): Update workflow templates from organization template repository' + draft: ${{ steps.sync.outputs.patch_failed == 'true' }} + add-paths: .github/workflows/*.yml,.github/actions-lock.txt + body: | + Automated update of workflow templates from [LibreCodeCoop/.github](https://github.com/LibreCodeCoop/.github) + ${{ steps.sync.outputs.summary }} + labels: | + dependencies + 3. to review diff --git a/.github/workflows/sync-workflow-templates.yml.patch b/.github/workflows/sync-workflow-templates.yml.patch new file mode 100644 index 0000000..b3e0b17 --- /dev/null +++ b/.github/workflows/sync-workflow-templates.yml.patch @@ -0,0 +1,11 @@ +--- a/.github/workflows/sync-workflow-templates.yml ++++ b/.github/workflows/sync-workflow-templates.yml +@@ -37,7 +37,7 @@ + pull-requests: write + + env: +- AUTH_MODE: ${{ vars.WORKFLOW_SYNC_AUTH_MODE || 'github-app' }} ++ AUTH_MODE: ${{ vars.WORKFLOW_SYNC_AUTH_MODE || 'token' }} + + steps: + - name: Check actor permission diff --git a/README.md b/README.md index a6dbf7d..7943df7 100644 --- a/README.md +++ b/README.md @@ -1,98 +1,67 @@ # LibreSign 3rdparty -Scoped 3rd party libraries that are necessary to run the LibreSign Nextcloud app. +Vendored Composer dependencies for the LibreSign Nextcloud app. PHP-Scoper +isolates these libraries under `OCA\Libresign\Vendor\` to avoid namespace +conflicts with Nextcloud and other apps. + +## Updating dependencies + +Dependabot proposes updates for `main` and maintained stable branches. The +usual workflow is: + +1. Review the dependency version and lockfile changes in the + [3rdparty pull request](https://github.com/LibreSign/3rdparty/pulls). +2. A maintainer comments `/composer-update` on that PR to regenerate the + vendored, scoped libraries and autoload files. Wait for the 3rdparty CI. +3. Comment `/libresign-pr` on the same PR to create a matching pull request + in [LibreSign](https://github.com/LibreSign/libresign/pulls), targeting + the corresponding branch and pointing to the proposed 3rdparty commit. +4. Review and test the integration in LibreSign. After approval, merge the + 3rdparty PR first. +5. Comment `/update-3rdparty` on the linked LibreSign PR to update its + submodule pointer to the exact commit integrated into 3rdparty. + Wait for the new LibreSign CI checks before merging that PR. + +These commands are restricted to maintainers and pull-request branches hosted +in the respective repositories. They create or update PRs; **they do not merge +anything automatically**. For forks or unavailable automation, use the manual +procedure below. + +### Manual fallback + +In a clean, disposable 3rdparty working tree: + +1. Update the version constraint in `composer.json`, if needed, and run + `composer update vendor/package`. +2. Remove the generated `composer/*/` and `vendor/*/` directories, then run + `composer install --no-dev`. The Composer scripts execute PHP-Scoper. +3. Run `git clean -X -d -f` and `composer dump-autoload -o`. **Note:** + `git clean -X` permanently removes ignored files; inspect the working + tree first. +4. Commit the changed manifest, lockfile and generated dependencies with DCO + sign-off, then open a 3rdparty PR. +5. In `LibreSign/libresign`, create a separate branch and PR updating only + the `3rdparty` submodule to the candidate commit. After the 3rdparty PR + is merged, add another signed-off commit pointing to the integrated SHA. + Rerun LibreSign CI before merging. + +Do not amend or force-push merely to update the submodule pointer. + +## PHP-Scoper + +- Dependency requirements are defined in `composer.json`; downloaded sources + live in `vendor/`, and scoped output is generated in `composer/`. +- `scoper.inc.php` contains namespace rules and special handling for Twig, + mPDF, phpseclib and PDFParser. +- Composer's `post-install-cmd` and `post-update-cmd` regenerate the scoped + libraries. Do not hand-edit generated dependencies. + +For troubleshooting, PHP-Scoper can also be invoked explicitly after +installing its tooling: -This repository contains vendor dependencies processed with PHP-Scoper to avoid conflicts with Nextcloud core and other apps. All classes are prefixed with `OCA\Libresign\Vendor\`. - -## Structure - -The LibreSign 3rdparty repository has a different structure compared to Nextcloud's 3rdparty: - -- **Scoped dependencies**: Located in `composer/` directory (not root) -- **Source dependencies**: Located in `vendor/` directory -- **Scoper configuration**: Uses `scoper.inc.php` to apply namespace transformations -- **Automatic processing**: PHP-Scoper runs automatically via composer scripts - -## Updating libraries manually - -1. Make sure to use the latest version of composer: `composer self-update` -2. Edit composer.json and adjust the version of the library to the one to update to. Pay attention to use the full version number (i.e. ^5.3.14). -3. Run `composer update thevendor/thelib` (replace accordingly) -4. Delete all installed dependencies with `rm -rf ./composer/*/ ./vendor/*/` -5. Run `composer install --no-dev` - - This automatically runs PHP-Scoper via post-install-cmd script - - Scoped dependencies are generated in `composer/` directory -6. Run `git clean -X -d -f` -7. Run `composer dump-autoload` -8. Commit all changes onto a new branch -9. You might need the following command for pushing if used as submodule: `git push git@github.com:libresign/3rdparty.git branchname` - -## PHP-Scoper Integration - -This repository uses PHP-Scoper to avoid namespace conflicts with Nextcloud core and other apps: - -- **Namespace prefix**: `OCA\Libresign\Vendor\` -- **Configuration**: See `scoper.inc.php` for scoping rules and patchers -- **Output directory**: `composer/` (configured in scoper.inc.php) -- **Automatic execution**: Runs via composer post-install-cmd and post-update-cmd scripts - -### Scoper Patchers - -The `scoper.inc.php` file includes specific patchers for: -- **Twig**: Handles template compilation and function calls -- **Mpdf**: Manages PDF generation library scoping -- **phpseclib**: Cryptographic library adjustments -- **pdfparser**: PDF parsing functionality - -### Manual Scoper Execution - -If you need to run PHP-Scoper manually: - -```bash -# Install scoper dependencies first +```sh composer bin all install --ansi - -# Run scoper manually php -d error_reporting=E_ALL\&~E_DEPRECATED\&~E_USER_DEPRECATED \ vendor-bin/php-scoper/vendor/humbug/php-scoper/bin/php-scoper add-prefix --force - -# Regenerate autoload composer dump-autoload -o ``` - -## Testing your PR with LibreSign - -1. On https://github.com/libresign/libresign make a new branch `3rdparty/my-dependency` -2. Navigate into the 3rdparty directory -3. Checkout the commit sha of the **last commit** of your PR in the 3rdparty repository -4. Leave the directory -5. Add the change to the stash -6. Commit (with sign-off and message) -7. Push the branch and send a PR -8. ⏳ Wait for CI and reviews -9. Navigate into the 3rdparty directory -10. Checkout the commit sha of the **merge commit** of your PR in the 3rdparty repository -11. Leave the directory -12. Add the change to the stash -13. Amend to the previous dependency bump -14. Push with lease force -15. ⏳ Wait for CI -16. Merge 🎉 - -```sh -cd 3rdparty -git checkout 16cd747ebb8ab4d746193416aa2448c8114d5084 -cd .. -git add 3rdparty -git commit -git push origin 3rdparty/my-dependency - -# Wait for CI and reviews - -cd 3rdparty -git checkout 54b63cc87af3ddb0ddfa331f20ecba5fcc01d495 -cd .. -git add 3rdparty -git commit --amend -git push --force-with-lease origin 3rdparty/my-dependency -```