-
Notifications
You must be signed in to change notification settings - Fork 14
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
Open
adamwg
wants to merge
2
commits into
crossplane:main
Choose a base branch
from
adamwg:awg/reuse-docs-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+8
−2
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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? |
||
| add-paths: content/cli/master/command-reference.md | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.