-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": patch | ||
--- | ||
|
||
Fix `border-color` on ActionList Group header |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": patch | ||
--- | ||
|
||
Remove `min-width` on leading visuals in ActionList |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": minor | ||
--- | ||
|
||
Convert ConfirmationDialog to CSS modules behind feature flag |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Check for integration result comment | ||
|
||
on: | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
jobs: | ||
# note: this workflow always passes, it does not fail when integration tests are failing | ||
check-for-integration-result-comment: | ||
if: github.event.issue.pull_request | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get integration result comment | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const INTEGRATION_LABEL_NAMES = { | ||
// synced with https://github.com/primer/react/labels?q=integration-tests | ||
skipped: 'integration-tests: skipped manually', | ||
recommended: 'integration-tests: recommended', | ||
failing: 'integration-tests: failing', | ||
passing: 'integration-tests: passing' | ||
}; | ||
const issue = { | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo | ||
}; | ||
const { data: currentLabels } = await github.rest.issues.listLabelsOnIssue(issue); | ||
const existingIntegrationLabels = currentLabels | ||
.map(label => label.name) | ||
.filter(label => label.startsWith('integration-tests:')); | ||
if (existingIntegrationLabels.includes(INTEGRATION_LABEL_NAMES.skipped)) return; | ||
const result = await github.rest.issues.listComments(issue); | ||
const integrationComments = result.data.filter( | ||
comment => | ||
comment.user.login == 'primer-integration[bot]' && | ||
comment.body.includes('<!-- test-result') | ||
); | ||
if (integrationComments.length === 0) { | ||
console.log('Integration comment with test-result not found'); | ||
return; // CI should pass if there's nothing to do | ||
} | ||
const latestComment = integrationComments.pop(); | ||
console.log(latestComment.body); | ||
// based on comment message in github/github: https://github.com/github/github/blob/fe7fe9072fd913ec04255ce7403ae764e6c33d5f/.github/workflows/github-ci.yml#L664-L692 | ||
const pass = latestComment.body.includes('🟢'); | ||
console.log({ pass }); | ||
const newIntegrationLabel = pass ? INTEGRATION_LABEL_NAMES.passing : INTEGRATION_LABEL_NAMES.failing; | ||
console.log({existingIntegrationLabels, newIntegrationLabel}) | ||
Object.values(INTEGRATION_LABEL_NAMES).map(async (name) => { | ||
if (name === newIntegrationLabel) { | ||
if (existingIntegrationLabels.includes(name)); // already added, nothing to do here | ||
else await github.rest.issues.addLabels({...issue, labels: [newIntegrationLabel]}); | ||
} else if (existingIntegrationLabels.includes(name)) { | ||
// remove outdated labels | ||
await github.rest.issues.removeLabel({ ...issue, name }); | ||
} | ||
}); |