-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symlinks aren't handled correctly #83
Comments
I also suspect it would be in ghcommit-action, however, my initial attempts at recreating are inconclusive at the moment. The ghcommit-action runs |
The reproducer I outlined above still works. Here it is in essentially bare repo qoomon (correct): https://github.com/tophercullen/scratch/pull/3/files As seen in those PRs, the ghcommit-action is creating a defunct symlink commit. You can also see this by pulling the branch and checking the file system structure. This is the result:
As you can see, and as noted above, the link name is the contents of the symlink target. |
@tophercullen Thanks for those. I did a quick skim of the qoomon action repo (search) yesterday and it appears it does not use the graphQL From the https://github.com/qoomon/actions--create-commit README:
And this is documented by github here: https://github.com/qoomon/actions--create-commit/blob/main/lib/github.ts
After reading that my next debug step would be to determine if symlinks are supported by the The This leads me to believe that symlinks are not supported by the graphql API, and some googling led me to this: https://github.com/shogo82148/actions-commit-and-create-pr/
I am led to believe symlinks will just not be possible with The purpose of
Unless I discover some new information that refutes any of the above, what I think I will do is modify the README to include the following and then close this issue:
|
A lot to digest, so I apologize ahead of time if I missed and/or misunderstood something.
This is indeed the problem I am solving (e.g. requiring signed commits). However, the solutions described don't seem accurate. Something about option 2 or 3 is off, and is why I opened this issue. If you look those PRs again, you will see that both PR commits are signed and verified with the same key ID. But I have not setup any custom Github Apps. The token in use for both workflows is the short-lifetime GITHUB_TOKEN's issued to github-actions workflows. See the workflow files and this doc. I do know the custom app setup you refer to. I do need to use such a thing for PRs workflows as the default actions token isn't scoped for team membership, which is required for adding reviewers in certain other actions.
Just to reiterate, the current implementation of qoomon in that scratch repo, does not use a custom github app token. The workflow as defined creates signed/verified commits with symlinks correctly using the short-lifetime GITHUB_TOKEN's issued to github-actions workflows.
The docs indicate to me a file contents only limitation. In addition to symlinks, other non-content changes will be missed. The only one I could think of off hand, are file permissions. I added a simple reproducer to that same scratch repo that adds execute to a file. Predictably, this change was committed with the qoomon action, and notably absent in ghcommit commit. Even if documented, these limitations can be exceptionally confusing for users. As-is, the ghcommit actions logs lead the user to believe the change(s) will be committed, and then is incorrect or silently dropped due to the API used. Obviously, my expectation would be for this type of action to support changes typical to a |
@tophercullen If the qoomon action is able to create verified commits with the default |
Unsure if this should be here, or in the ghcommit-action repo. It appears likely there's an assumption being made about the file modes when generating the commit blobs. This causing this utility (and dependent action) to generate defunct commits.
Reproducer: Create a new, or modify an existing, symlink to file in the repo. Run the utility (or Github action).
Expected result: the symlink is created/updated to point to the target file.
Actual result: the symlink points to a non-existent file. The name of this file is the contents of the symlink target.
As I'm able to use another action achieve a similar result successfully (qoomon/actions--create-commit), I presume this isn't a limitation of the GH API, but something specific to its usage here.
The text was updated successfully, but these errors were encountered: