-
-
Notifications
You must be signed in to change notification settings - Fork 807
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
ci: update of files from global .github repo #3695
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis change updates multiple GitHub Actions workflows. It modifies the Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Actions Workflow
participant Step as create-commit-message Step
participant Parser as JSON Parser (fromJSON)
participant Merge as Merge Commit Construction
Workflow->>Step: Execute commit message creation
Step-->>Workflow: Return output (JSON encoded)
Workflow->>Parser: Parse output using fromJSON
Parser-->>Workflow: Parsed commit message
Workflow->>Merge: Build MERGE_COMMIT_MESSAGE with parsed content
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
✅ Deploy Preview for asyncapi-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/automerge-for-humans-merging.yml (1)
92-92
: Ensure Valid JSON Processing for Commit MessageThe modification correctly switches to using
fromJSON
with thesteps.create-commit-message.outputs.result
output. Please ensure that this output is always a valid JSON string so that the commit message is parsed correctly. If the string isn’t properly JSON-formatted, the workflow could fail or produce unintended results.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/automerge-for-humans-merging.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 180000ms (4)
- GitHub Check: Redirect rules - asyncapi-website
- GitHub Check: Header rules - asyncapi-website
- GitHub Check: Pages changed - asyncapi-website
- GitHub Check: Lighthouse CI
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.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/transfer-issue.yml (3)
13-13
: Simplify Complex Job Condition
The conditional expression for the job is rather complex:if: ${{ (!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot') && (startsWith(github.event.comment.body, '/transfer-issue') || startsWith(github.event.comment.body, '/ti')) }}
Consider refactoring or breaking it into multiple logical parts for better readability and maintainability.
38-47
: Enhance Error Handling in Repository Check
Within the "Check Repo" step’s catch block, the code creates a comment and then callsprocess.exit(1)
without logging detailed error information. Consider logging the caught error or adding additional context so that debugging failures in repository verification becomes easier.
57-57
: Remove Trailing Spaces
There are trailing spaces detected on line 57. Removing these will help you comply with YAML lint standards and improve readability.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 57-57: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/help-command.yml
(1 hunks).github/workflows/transfer-issue.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/transfer-issue.yml
20-20: "github.event.comment.body" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 YAMLlint (1.35.1)
.github/workflows/transfer-issue.yml
[error] 57-57: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 180000ms (1)
- GitHub Check: Automerge PR autoapproved by a bot
🔇 Additional comments (4)
.github/workflows/help-command.yml (2)
1-3
: Header Notice on Central Management
The header correctly reminds readers that this workflow is maintained in the global repository. Please ensure any future modifications are done in the upstream repo rather than locally.
61-62
: New Transfer Issue Command Description
The new command documentation for/transfer-issue {repo-name}
(and its alias/ti {repo-name}
) is clear and includes helpful examples. Verify that these examples exactly reflect the workflow behavior in the corresponding transfer process..github/workflows/transfer-issue.yml (2)
1-3
: Header Notice on Central Management
The header informs users that this file is centrally managed. Ensure any changes propagate from the central repository to avoid divergence.
50-57
: Verify Transfer Issue Command Execution
The "Transfer Issue" step uses the command:gh issue transfer ${{github.event.issue.number}} asyncapi/${{steps.extract_step.outputs.repo}}Please ensure that the GitHub CLI is pre-installed in the runner environment and that any failure of this command is properly captured and logged for troubleshooting.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 57-57: trailing spaces
(trailing-spaces)
COMMENT="${{github.event.comment.body}}" | ||
REPO=$(echo $COMMENT | awk '{print $2}') | ||
echo repo=$REPO >> $GITHUB_OUTPUT |
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.
Security Improvement: Handle Untrusted Input Safely
The "Extract Input" step uses the untrusted github.event.comment.body
directly in the shell script:
COMMENT="${{github.event.comment.body}}"
REPO=$(echo $COMMENT | awk '{print $2}')
echo repo=$REPO >> $GITHUB_OUTPUT
This can risk command injection. Instead, pass github.event.comment.body
as an environment variable using the env:
field (e.g., COMMENT: ${{ github.event.comment.body }}
) and then reference $COMMENT
in the script. This approach complies with GitHub’s security-hardening recommendations.
Summary by CodeRabbit
New Features
/transfer-issue {repo-name}
or/ti {repo-name}
for transferring issues between repositories.Chores