Skip to content

Commit

Permalink
fix: fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jeesonjohnson committed Sep 18, 2024
2 parents 1fd80a1 + 0ac7669 commit f6e1511
Show file tree
Hide file tree
Showing 446 changed files with 8,655 additions and 4,083 deletions.
28 changes: 28 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,34 @@
"contributions": [
"code"
]
},
{
"login": "amal-k-joy",
"name": "Amal K Joy",
"avatar_url": "https://avatars.githubusercontent.com/u/153802538?v=4",
"profile": "https://github.com/amal-k-joy",
"contributions": [
"code"
]
},
{
"login": "annawen1",
"name": "Anna Wen",
"avatar_url": "https://avatars.githubusercontent.com/u/54281166?v=4",
"profile": "https://github.com/annawen1",
"contributions": [
"code",
"infra"
]
},
{
"login": "ariellalgilmore",
"name": "Ariella Gilmore",
"avatar_url": "https://avatars.githubusercontent.com/u/20210594?v=4",
"profile": "https://github.com/ariellalgilmore",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 5,
Expand Down
3 changes: 3 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ to see if a similar issue has already been submitted. If a similar issue has
been submitted, assign yourself or ask to be assigned to the issue by posting a
comment. If the issue does not exist, please make a new issue.

All issues should be triaged by our team before a PR is reviewed to evaluate if
the given work aligns with our design guidelines.

**Note 2:** If you are submitting a new component or pattern there are some
additional steps we’d like you to take. In brief, use the
`New component or pattern` issue template. The new issue should be an epic.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- v1
- 'release/v2*'
merge_group:
types: [checks_requested]

Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/create-release-tag-and-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Creates and pushes release tag, then creates release notes from the changelogs.
# Creates PR to merge changelog and version bump updates from release to main branch
name: Create github tag and PR

on:
workflow_dispatch:
inputs:
tag:
# Recently published version
required: true
description: 'release tag (ie. v2.46.0-rc.0)'
type: string
default: 'v2.46.0-rc.0'
previous-tag:
# Previous release tag to grab changelogs from
# To pick the previous tag:
# - If published tag is the first release candidate, choose the previous full release tag.
# - If published tag is a subsequent release candidate, choose the previous release candidate.
# - If published tag is a full release, choose the previous full release tag.
required: true
description: 'previous release tag (ie. v2.45.0)'
type: string
default: 'v2.45.0'
create-pr:
# set to true to create PR to merge changes from release to `main` branch
required: true
description: 'Create PR?'
type: boolean
default: true

jobs:
create-pull-request:
runs-on: ubuntu-latest
timeout-minutes: 60
if: github.event.inputs.create-pr == 'true'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: '0'

# https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
- run: |
git config --global user.email ${{ secrets.CARBON_BOT_EMAIL }}
git config --global user.name ${{ secrets.CARBON_BOT_NAME }}
# Create a new branch off the release branch for the PR, we do this to ensure the release branch
# is not affected
- name: Create branch
run: |
git checkout -b chore/${{ github.event.inputs.tag }}-release
git push origin chore/${{ github.event.inputs.tag }}-release
# Create PR with the new branch
- name: Create Pull Request
run: |
gh pr create -B main -H chore/${{ github.event.inputs.tag }}-release --title 'chore(release): ${{ github.event.inputs.tag }}' --body 'Automated release PR for ${{ github.event.inputs.tag }}
**Checklist**
- [ ] Verify package version bumps are accurate
- [ ] Verify CI passes as expected'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# This job creates the git tag for the release (ie. v2.47.0)
create-release-tag:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: '0'
token: ${{ secrets.GH_TOKEN_LERNA }} # https://github.com/lerna/lerna/issues/1957

# https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
- run: |
git config --global user.email ${{ secrets.CARBON_BOT_EMAIL }}
git config --global user.name ${{ secrets.CARBON_BOT_NAME }}
- name: Create tag and push
run: |
git tag -a ${{ github.event.inputs.tag }} -m "Release ${{ github.event.inputs.tag }}"
git push origin ${{ github.event.inputs.tag }}
# This job creates the release with the git tag pushed from job above with the corresponding
# release notes from the previous version to current
create-release:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: create-release-tag
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: '0'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Install dependencies
run: yarn install

# Generate the changelog with the local 'get-changelog.js' script and output to 'changelog.txt' file
- name: Run changelog script
id: run-changelog
run: |
node ./scripts/get-changelog.js -f ${{ github.event.inputs.previous-tag }} -t ${{ github.event.inputs.tag }} >> changelog.txt
# Creates the release with the generated changelog
- uses: ncipollo/release-action@v1
with:
tag: '${{ github.event.inputs.tag }}'
name: '${{ github.event.inputs.tag }}'
prerelease: true
bodyFile: './changelog.txt'
28 changes: 28 additions & 0 deletions .github/workflows/process-pr-review-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Process saved PR data and apply appropriate labels

# We have access to repo secrets from here. If the `Received PR review` workflow has completed
# it means there has been a workflow artifact created with the data we need to apply the appropriate
# review labels from the custom action used from this workflow
on:
workflow_run:
workflows: ['Received PR review']
types:
- completed

jobs:
upload:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request_review' &&
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'
cache: yarn
- uses: ./actions/add-review-labels
with:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
27 changes: 27 additions & 0 deletions .github/workflows/received-pr-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Save PR review data to as artifact to process in a privileged workflow that is dispatched from this one
name: Received PR review
on: [pull_request_review]
jobs:
pr_review_submitted:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
if: ${{contains(github.event_name, 'pull_request_review')}}
# First save github.event (from the unprivileged workflow) and then pass it through to the privileged action
# where we have access to repo secrets
steps:
- name: Store GitHub event in a workflow artifact
id: github_event_step
env:
JSON: ${{ toJSON(github.event) }}
run: |
mkdir -p ./pr_data
echo $JSON > ./pr_data/github.json
- name: Upload event data
id: upload_artifact
uses: actions/upload-artifact@v3
with:
name: pr-data-to-process
path: pr_data/
29 changes: 10 additions & 19 deletions .github/workflows/release-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ jobs:
- name:
Run @ibm/telemetry-js-config-generator to regenerate telemetry config
file
if: github.event.inputs.dry-run == 'true'
working-directory: ./packages/ibm-products
run: |
yarn telemetry-config
# This can be removed once @ibm/telemetry-js-config-generator has params to set the js scope
- name: Add js scope to telemetry config
if: github.event.inputs.dry-run == 'true'
working-directory: ./packages/ibm-products
run: |
echo " js:
Expand All @@ -78,42 +80,38 @@ jobs:
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.CARBON_BOT_NPM_TOKEN }}" >> .npmrc
# Set the dry run environment variable to be used later in the Lerna publish command
# Set the PUBLISH environment variable to be used later in the Lerna publish command.
# Lerna has dry run on by default, need to pass in '--yes' flag before it will go ahead and publish.
- name: Set dry run env variable
run: |
if [ "${{ github.event.inputs.dry-run }}" == "false" ]; then
echo "DRY_RUN=--yes" >> $GITHUB_ENV
echo "PUBLISH=--yes" >> $GITHUB_ENV
fi
- name: Publish full minor release (ie. v1.x.0)
if: github.event.inputs.type == 'full minor release'
run: |
echo "DRY RUN: ${{ env.DRY_RUN }}"
yarn lerna publish minor --conventional-graduate --create-release github $(echo "${{ env.DRY_RUN }}")
yarn lerna publish minor --conventional-graduate $(echo "${{ env.PUBLISH }}")
- name: Publish first minor RC (ie. v1.x.0-rc.0)
if: github.event.inputs.type == 'first minor rc'
run: |
echo "DRY RUN: ${{ env.DRY_RUN }}"
yarn lerna publish preminor --conventional-prerelease --create-release github --preid rc --pre-dist-tag next $(echo "${{ env.DRY_RUN }}")
yarn lerna publish preminor --conventional-prerelease --preid rc --pre-dist-tag next $(echo "${{ env.PUBLISH }}")
- name: Publish full patch release (ie. v1.0.x)
if: github.event.inputs.type == 'full patch release'
run: |
echo "DRY RUN: ${{ env.DRY_RUN }}"
yarn lerna publish patch --conventional-graduate --create-release github $(echo "${{ env.DRY_RUN }}")
yarn lerna publish patch --conventional-graduate $(echo "${{ env.PUBLISH }}")
- name: Publish first patch RC (ie. v1.0.x-rc.0)
if: github.event.inputs.type == 'first patch rc'
run: |
echo "DRY RUN: ${{ env.DRY_RUN }}"
yarn lerna publish prepatch --conventional-prerelease --create-release github --preid rc --pre-dist-tag next $(echo "${{ env.DRY_RUN }}")
yarn lerna publish prepatch --conventional-prerelease --preid rc --pre-dist-tag next $(echo "${{ env.PUBLISH }}")
- name: Publish subsequent RC (ie. v1.0.0-rc.x)
if: github.event.inputs.type == 'subsequent rc'
run: |
echo "DRY RUN: ${{ env.DRY_RUN }}"
yarn lerna publish --conventional-prerelease --create-release github --preid rc --pre-dist-tag next $(echo "${{ env.DRY_RUN }}")
yarn lerna publish --conventional-prerelease --preid rc --pre-dist-tag next $(echo "${{ env.PUBLISH }}")
# After successfully publishing a release candidate, trigger the staging storybook environment deployment workflow.
# Pass in the release branch name to the storybook deployment job so it build off the release branch
Expand All @@ -133,10 +131,3 @@ jobs:
with:
event-type: deploy-latest-storybook
client-payload: '{"branch": "${{ github.ref_name }}"}'

# Trigger the `automerge` workflow to the changelog and version bumps generated by Lerna get pushed to `main` branch
- name: Dispatch merge to `main` workflow
uses: peter-evans/repository-dispatch@v3
with:
event-type: merge-to-main
client-payload: '{"branch": "${{ github.ref_name }}"}'
12 changes: 6 additions & 6 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Stale # close stale issues
on:
schedule:
- cron: '30 7 * * 4' # runs 7:30 on Thursdays
- cron: '0 8 * * *' # Runs at 8:00 every day

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e #v9.0.0
with:
any-of-labels:
'status: needs reproduction,status: waiting for author 💬'
stale-issue-message: |
This issue is stale because it has been open for 30 days with no activity.
Remove the stale label or add a comment, otherwise this issue will be closed in 14 days.
This issue is stale because it has been open for 7 days with no activity.
Remove the stale label or add a comment, otherwise this issue will be closed in 7 days.
close-issue-message: |
This issue was closed because it has received no activity for 14 days.
stale-issue-label: 'stale 🍞'
close-issue-label: 'status: won’t fix 🔚'
days-before-stale: 30
days-before-close: 14
days-before-stale: 7
days-before-close: 7
days-before-pr-close: -1
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ package-lock.json

# Playwright
.playwright/
/packages/ibm-products/.playwright/

# Actions
/actions/**/node_modules
/actions/**/yarn.lock
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ Thanks goes to these wonderful people
<td align="center" valign="top" width="20%"><a href="https://github.com/anamikaanu96"><img src="https://avatars.githubusercontent.com/u/47971732?v=4?s=100" width="100px;" alt="Anamika T S"/><br /><sub><b>Anamika T S</b></sub></a><br /><a href="https://github.com/carbon-design-system/ibm-products/commits?author=anamikaanu96" title="Code">💻</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/szinta"><img src="https://avatars.githubusercontent.com/u/53395955?v=4?s=100" width="100px;" alt="Sinta Augustine"/><br /><sub><b>Sinta Augustine</b></sub></a><br /><a href="https://github.com/carbon-design-system/ibm-products/commits?author=szinta" title="Code">💻</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/AustinGitHub"><img src="https://avatars.githubusercontent.com/u/10100397?v=4?s=100" width="100px;" alt="Austin"/><br /><sub><b>Austin</b></sub></a><br /><a href="https://github.com/carbon-design-system/ibm-products/commits?author=AustinGitHub" title="Code">💻</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/amal-k-joy"><img src="https://avatars.githubusercontent.com/u/153802538?v=4?s=100" width="100px;" alt="Amal K Joy"/><br /><sub><b>Amal K Joy</b></sub></a><br /><a href="https://github.com/carbon-design-system/ibm-products/commits?author=amal-k-joy" title="Code">💻</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/ariellalgilmore"><img src="https://avatars.githubusercontent.com/u/20210594?v=4?s=100" width="100px;" alt="Ariella Gilmore"/><br /><sub><b>Ariella Gilmore</b></sub></a><br /><a href="https://github.com/carbon-design-system/ibm-products/commits?author=ariellalgilmore" title="Code">💻</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/annawen1"><img src="https://avatars.githubusercontent.com/u/54281166?v=4?s=100" width="100px;" alt="Anna Wen"/><br /><sub><b>Anna Wen</b></sub></a><br /><a href="https://github.com/carbon-design-system/ibm-products/commits?author=annawen1" title="Code">💻</a> <a href="#infra-annawen1" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 4 additions & 0 deletions actions/add-review-labels/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/__mocks__/**
**/__tests__/**
**/examples/**
**/tasks/**
6 changes: 6 additions & 0 deletions actions/add-review-labels/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:slim

WORKDIR /usr/src/action
COPY . .
RUN yarn install --production
ENTRYPOINT ["node", "/usr/src/action/index.js"]
12 changes: 12 additions & 0 deletions actions/add-review-labels/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Add review labels
description: A custom action that adds review labels to a Pull Request
inputs:
APP_ID:
description: GitHub app id
required: true
APP_PRIVATE_KEY:
description: GitHub app private key
required: true
runs:
using: 'docker'
image: 'Dockerfile'
Loading

0 comments on commit f6e1511

Please sign in to comment.