-
Notifications
You must be signed in to change notification settings - Fork 825
chore: fix screenshot workflows #2866
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
Conversation
Reviewer's GuideThis PR refactors and enhances the screenshot capture workflows across PR comments and CI pipelines by splitting iPhone and iPad pipelines, updating default device models, enforcing timeouts, removing redundant steps, and correctly targeting simulators via UDIDs. Sequence diagram for iPhone screenshot workflow with UDID targetingsequenceDiagram
participant CI as CI Workflow
participant Xcode as Set up Xcode
participant Checkout as Checkout Repo
participant Sim as Create iPhone Simulator
participant Flutter as Flutter Drive
participant Artifact as Upload Artifact
CI->>Xcode: Set up Xcode
Xcode->>Checkout: Checkout repository
Checkout->>Sim: Create iPhone Simulator (get UDID)
Sim->>Flutter: Pass UDID to flutter drive
Flutter->>Artifact: Capture and upload iPhone screenshots
Sequence diagram for iPad screenshot workflow with UDID targetingsequenceDiagram
participant CI as CI Workflow
participant Xcode as Set up Xcode
participant Checkout as Checkout Repo
participant Sim as Create iPad Simulator
participant Flutter as Flutter Drive
participant Artifact as Upload Artifact
CI->>Xcode: Set up Xcode
Xcode->>Checkout: Checkout repository
Checkout->>Sim: Create iPad Simulator (get UDID)
Sim->>Flutter: Pass UDID to flutter drive
Flutter->>Artifact: Capture and upload iPad screenshots
Class diagram for updated screenshot workflow actionsclassDiagram
class ScreenshotIphoneAction {
+IPHONE_DEVICE_MODEL: string
+Create iPhone Simulator (outputs UDID)
+Capture iPhone Screenshots (uses UDID)
+Upload iPhone Screenshots
}
class ScreenshotIpadAction {
+IPAD_DEVICE_MODEL: string
+Create iPad Simulator (outputs UDID)
+Capture iPad Screenshots (uses UDID)
+Upload iPad Screenshots
}
ScreenshotIphoneAction <|-- ScreenshotIpadAction
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
6246445 to
09189f1
Compare
Build StatusBuild workflow failed. Please check the logs for more information. Screenshots (Android)Not able to fetch screenshots. Screenshots (iPhone)Not able to fetch screenshots. Screenshots (iPad)Not able to fetch screenshots. |
5813073 to
d8b0e5a
Compare
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.
Hey there - I've reviewed your changes and they look great!
Blocking issues:
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
Prompt for AI Agents
Please address the comments from this code review:
## Security Issues
### Issue 1
<location> `.github/actions/screenshot-ipad/action.yml:13` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
### Issue 2
<location> `.github/actions/screenshot-ipad/action.yml:26` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
### Issue 3
<location> `.github/workflows/pull-request.yml:98` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
### Issue 4
<location> `.github/workflows/push-event.yml:228` </location>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Revamp screenshot workflows by splitting iPhone and iPad capture into separate jobs and actions, updating pull-request comment logic to fetch and display both device artifacts, and adding concurrency control to the PR workflow.
Enhancements: