-
Notifications
You must be signed in to change notification settings - Fork 134
Add GitHub warning to constraint layout dependency updates #14473
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
Merged
malinajirka
merged 1 commit into
trunk
from
issue/woomob-1047-dependabot-github-action-with-warning-about-constraint
Aug 19, 2025
Merged
Changes from all commits
Commits
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Dependabot POS Reminder | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
add-pos-reminder: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
|
||
steps: | ||
# Check if PR contains the constraintlayout dependency | ||
- name: Check for ConstraintLayout Compose dependency | ||
id: check-dependency | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const title = context.payload.pull_request.title; | ||
const body = context.payload.pull_request.body; | ||
const searchTerm = 'androidx.constraintlayout:constraintlayout-compose'; | ||
|
||
const containsDependency = | ||
title.includes(searchTerm) || | ||
body.includes(searchTerm); | ||
|
||
console.log(`PR contains ${searchTerm}: ${containsDependency}`); | ||
return containsDependency; | ||
result-encoding: string | ||
|
||
# Add comment if dependency is found | ||
- name: Comment on PR | ||
if: steps.check-dependency.outputs.result == 'true' | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
// Check if comment already exists to avoid duplicates | ||
const comments = await github.rest.issues.listComments({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo | ||
}); | ||
|
||
const botComment = comments.data.find(comment => | ||
comment.user.type === 'Bot' && | ||
comment.body.includes('POS testing') | ||
); | ||
|
||
if (!botComment) { | ||
const commentBody = `## ⚠️ POS Testing Required | ||
|
||
This PR updates \`androidx.constraintlayout:constraintlayout-compose\`, which affects the Point of Sale system. | ||
|
||
**Required Testing:** | ||
- [ ] Cart items remain visible during checkout | ||
- [ ] Layout constraints work correctly on all screen sizes | ||
- [ ] No UI elements disappear unexpectedly | ||
|
||
Please complete POS testing before merging this PR.`; | ||
|
||
await github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: commentBody | ||
}); | ||
} |
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.
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.
The multi-line template literal has inconsistent indentation. The content should be aligned with the opening backtick or use consistent indentation throughout the string.
Copilot uses AI. Check for mistakes.