Skip to content

Commit 3c0586c

Browse files
committed
chore(action): Clean up the README examples a bit
1 parent 6cb6ab6 commit 3c0586c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ mutation.
1212
When this API is used with a GitHub App token, the resulting commit will be signed and verified by
1313
GitHub on behalf of the application.
1414

15+
*NOTE:* One limitation of creating commits using the GraphQL API is that it does not expose any
16+
mechanism to set or change file modes. It merely takes the file contents, base64 encoded. This means
17+
that if you rely on `commit-headless` to push binary files (or executable scripts), the file in the
18+
resulting commit will not retain that executable bit.
19+
1520
[mutation]: https://docs.github.com/en/graphql/reference/mutations#createcommitonbranch
1621
[action-branch]: https://github.com/DataDog/commit-headless/tree/action
1722

action-template/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ If your workflow creates multiple commits and you want to push all of them, you
2727
git add bot.txt && git commit -m"bot commit 2"
2828
2929
# List both commit hashes in reverse order, space separated
30-
echo "commits=\"$(git log "${{ github.sha }}".. --format='%H%x00' | tr '\n' ' ')\"" >> $GITHUB_OUTPUT
30+
echo "commits=\"$(git log "${{ github.sha }}".. --format='%H' | tr '\n' ' ')\"" >> $GITHUB_OUTPUT
31+
32+
# If you just have a single commit, you can do something like:
33+
# echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
34+
# and then use it in the action via:
35+
# with:
36+
# ...
37+
# commits: ${{ steps.create-commits.outputs.commit }}
3138
3239
- name: Push commits
3340
uses: DataDog/commit-headless@action/v%%VERSION%%

0 commit comments

Comments
 (0)