You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This is most likely a bug in go-git. I ran an job to update files in the .github/workflows directory on multiple repos (same as #435). When it worked for most repos, one repo ended up with an empty PR, which was curious. On closer inspection, that repo had a .gitignore file that used the include pattern (see below). Changing the config to git-type: cmd worked (once I had closed the old PR).
.*!.github
Config file
# Base URL of the (v3) GitHub API, needs to be changed if GitHub enterprise is used. Or the url to a self-hosted GitLab instance.base-url: https://github.company.com/api/v3# The name of the branch where changes are committed.branch: update-internal-actions# Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use `fork:true` to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.code-search: "internal/github-action extension:yml extension:yaml path:.github -org:org-a -org:org-b -org:ab-archive"# The commit message. Will default to title + body if none is set.commit-message: "refactor: update internal actions"# What should happen if the branch already exist.# Available values:# skip: Skip making any changes to the existing branch and do not create a new pull request.# replace: Replace the existing content of the branch by force pushing any new changes, then reuse any existing pull request, or create a new one if none exist.conflict-strategy: skip# Create pull request(s) as draft.draft: false# Run without pushing changes or creating pull requestsdry-run: false# Fork the repository instead of creating a new branch on the same owner.fork: true# The type of git implementation to use.# Available values:# go: Uses go-git, a Go native implementation of git. This is compiled with the multi-gitter binary, and no extra dependencies are needed.# cmd: Calls out to the git command. This requires git to be installed and available with by calling "git".git-type: go# The file where all logs should be printed to. "-" means stdoutlog-file: "-"# The formatting of the logs. Available values: text, json, json-prettylog-format: text# The level of logging that should be made. Available values: trace, debug, info, errorlog-level: info# The file that the output of the script should be outputted to. "-" means stdoutoutput: "-"# The body of the commit message. Will default to everything but the first line of the commit message if none is set.pr-body: | This is an automated PR to update the internal actions in this repository.
To Reproduce
Steps to reproduce the behavior:
Have a repo with a .gitignore file using the include pattern
Run multi-gitter run ./replace.sh --config ./multi-gitter-config.yml --token $GITHUB_TOKEN where replace.sh updates files in the .github/workflows directory.
The PR is created, but it is empty without any changes.
Expected behavior
It should create the PR, but also include the changes in files matching the include pattern in the .gitignore file.
Additional context
Add any other context about the problem here.
It is for example often useful to include detailed logs from a run with --log-level=trace.
The text was updated successfully, but these errors were encountered:
It seems that go-gits implementation of gitignore is indeed not 1:1 with "normal" git. It seems that inclusion patterns should be supported, but something is apparently not matching.
Describe the bug
This is most likely a bug in
go-git
. I ran an job to update files in the.github/workflows
directory on multiple repos (same as #435). When it worked for most repos, one repo ended up with an empty PR, which was curious. On closer inspection, that repo had a.gitignore
file that used the include pattern (see below). Changing the config togit-type: cmd
worked (once I had closed the old PR).Config file
To Reproduce
Steps to reproduce the behavior:
.gitignore
file using the include patternmulti-gitter run ./replace.sh --config ./multi-gitter-config.yml --token $GITHUB_TOKEN
wherereplace.sh
updates files in the.github/workflows
directory.Expected behavior
It should create the PR, but also include the changes in files matching the include pattern in the
.gitignore
file.Additional context
Add any other context about the problem here.
It is for example often useful to include detailed logs from a run with
--log-level=trace
.The text was updated successfully, but these errors were encountered: