-
Notifications
You must be signed in to change notification settings - Fork 17
ci: Re-use exising docs PRs and sign off on commits #120
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -260,7 +260,13 @@ jobs: | |
| with: | ||
| token: ${{ steps.generate-token.outputs.token }} | ||
| path: ./docs | ||
| commit-message: Update master CLI reference docs for ${{ needs.build-artifacts.outputs.version }} | ||
| commit-message: | | ||
| Update master CLI reference docs for ${{ needs.build-artifacts.outputs.version }} | ||
|
|
||
| Signed-off-by: cli-docs-bot <info@crossplane.io> | ||
| title: Update master CLI reference docs for ${{ needs.build-artifacts.outputs.version }} | ||
| branch: cli-docs-${{ needs.build-artifacts.outputs.version }} | ||
| # We use a static branch name so that if an existing PR is already | ||
| # open it gets updated, rather than opening a sequence of PRs of which | ||
| # it makes sense to merge only the most recent. | ||
| branch: auto-update-cli-docs | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since we'll be re-using the same branch, is there any additional config/settings we need to do to make sure it keeps getting synced/rebased to the latest in docs master?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The contents of the branch will be re-created each time the workflow runs by checking out the current docs master branch and running |
||
| add-paths: content/cli/master/command-reference.md | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
For peter-evans/create-pull-request v7, what are the default commit author and committer values, and doessignoff: truegenerate a Signed-off-by line tied to that identity?💡 Result:
In peter-evans/create-pull-request v7, the default values for commit author and committer are as follows: - Author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}
@users.noreply.github.com> [1][2] - Committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> [1][2] Regarding thesignoffinput, it is distinct from thesign-commitsfeature introduced in v7 [3][4]. Thesignoffinput (if set totrue) appends a Signed-off-by line to the commit message [1][5]. This line is tied to the identity defined by the commit author, as configured by the action'sauthorinput [1][2]. Please note that this is different from commit signature verification (enabled viasign-commits: true), which uses GPG or bot-generated signatures to verify the origin of a commit [3][4]. If you are using thesignoffinput, it will append the standard trailer (e.g., Signed-off-by: Display Name email@address.com) using the information provided in theauthorfield [1].Citations:
Ensure commit author and Signed-off-by footer match to satisfy DCO validation
Great addition of DCO support! Just to clarify how this works with
peter-evans/create-pull-request@v7: when you don't explicitly setauthorandcommitterinputs, the action defaults to using the GitHub Actions trigger context (github.actor) as the commit author. This means the commit author will be whoever triggered the workflow, notcli-docs-bot.Since your commit message manually includes
Signed-off-by: cli-docs-bot <info@crossplane.io>, there's a mismatch—DCO typically validates that the Signed-off-by identity matches the commit author, so downstream checks may still fail.To align these, consider explicitly configuring the author identity and letting the action handle the sign-off:
Suggested adjustment
- name: Create docs PR if: ${{ github.ref == 'refs/heads/main' && steps.find-changes.outputs.changed == 'true' }} uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7 with: token: ${{ steps.generate-token.outputs.token }} path: ./docs + author: cli-docs-bot <info@crossplane.io> + committer: cli-docs-bot <info@crossplane.io> + signoff: true commit-message: | Update master CLI reference docs for ${{ needs.build-artifacts.outputs.version }} - - Signed-off-by: cli-docs-bot <info@crossplane.io> title: Update master CLI reference docs for ${{ needs.build-artifacts.outputs.version }} branch: auto-update-cli-docs add-paths: content/cli/master/command-reference.mdThis ensures the commit author, Signed-off-by footer, and DCO validation all align correctly.
📝 Committable suggestion
🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be a good idea @adamwg ^ (if it's correct)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this suggestion is valid, the README of the gh action confirms it https://github.com/peter-evans/create-pull-request#action-inputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, merged before addressing this 🤦♂️. I will fix it in a follow-up.