Skip to content

Commit 2ec7eba

Browse files
authored
Merge branch 'callstack:main' into main
2 parents f5d751c + ff0df54 commit 2ec7eba

File tree

14 files changed

+354
-112
lines changed

14 files changed

+354
-112
lines changed

.github/workflows/check-repro.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/publish-each-pr.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
name: Expo Preview
22
on: [pull_request]
33

4+
permissions:
5+
contents: read
6+
pull-requests: write
7+
48
jobs:
59
publish:
610
name: Install and publish
711
runs-on: ubuntu-latest
812
if: github.event.pull_request.head.repo.full_name == 'callstack/react-native-paper'
913
steps:
1014
- name: Checkout
11-
uses: actions/checkout@v4
15+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
1216

1317
- name: Setup Node.js
14-
uses: actions/setup-node@v4
18+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
1519
with:
1620
node-version-file: .nvmrc
1721

1822
- name: Setup Expo
19-
uses: expo/expo-github-action@v7
23+
uses: expo/expo-github-action@d300b960e9f91a8c59b2aaca92e89ad70b0785ac # v7
2024
with:
2125
eas-version: latest
2226
token: ${{ secrets.EXPO_TOKEN }}
2327

2428
- name: Restore dependencies
2529
id: yarn-cache
26-
uses: actions/cache/restore@v4
30+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4
2731
with:
2832
path: '**/node_modules'
2933
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
@@ -40,7 +44,7 @@ jobs:
4044
4145
- name: Cache dependencies
4246
if: steps.yarn-cache.outputs.cache-hit != 'true'
43-
uses: actions/cache/save@v4
47+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4
4448
with:
4549
path: '**/node_modules'
4650
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}
@@ -55,7 +59,7 @@ jobs:
5559
run: echo "EXPO_CONFIG=$(npx expo config --json)" >> $GITHUB_OUTPUT
5660

5761
- name: Comment on PR
58-
uses: actions/github-script@v7
62+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
5963
with:
6064
github-token: ${{ secrets.GITHUB_TOKEN }}
6165
script: |

.github/workflows/semantic-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
name: Validate PR title
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: amannn/[email protected]
9+
- uses: amannn/action-semantic-pull-request@91682d013dea3ff257520b9b68c9cb93ced4fe9b # v4.5.0
1010
env:
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1212
with:

.github/workflows/stale.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ on:
44
schedule:
55
- cron: '30 1 * * *'
66

7+
permissions:
8+
contents: read
9+
issues: write
10+
pull-requests: write
11+
712
jobs:
813
stale:
914
runs-on: ubuntu-latest
1015
steps:
11-
- uses: actions/stale@v9
16+
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
1217
with:
1318
repo-token: ${{ secrets.GITHUB_TOKEN }}
1419
days-before-stale: 30

.github/workflows/triage.yaml

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,63 @@ on:
33
issues:
44
types: [labeled]
55

6+
permissions:
7+
contents: read
8+
issues: write
9+
610
jobs:
711
needs-more-info:
812
runs-on: ubuntu-latest
913
if: github.event.label.name == 'needs more info'
1014
steps:
11-
- uses: actions/checkout@master
12-
- uses: actions/[email protected]
13-
env:
14-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
16+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
1517
with:
16-
args: comment "Hey! Thanks for opening the issue. Can you provide more information about the issue? Please fill the issue template when opening the issue without deleting any section. We need all the information we can, to be able to help. Make sure to at least provide - Current behaviour, Expected behaviour, A way to reproduce the issue with minimal code (link to [snack.expo.dev](https://snack.expo.dev)) or a repo on GitHub, and the information about your environment (such as the platform of the device, versions of all the packages etc.)."
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
script: |
20+
const actor = context.actor;
21+
const { data: collaborators } = await github.rest.repos.listCollaborators({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
});
25+
26+
const isCollaborator = collaborators.some(collaborator => collaborator.login === actor);
27+
if (!isCollaborator) {
28+
console.log(`Actor ${actor} is not a collaborator, skipping workflow`);
29+
return;
30+
}
31+
32+
github.rest.issues.createComment({
33+
issue_number: context.issue.number,
34+
owner: context.repo.owner,
35+
repo: context.repo.repo,
36+
body: "Hey! Thanks for opening the issue. Can you provide more information about the issue? Please fill the issue template when opening the issue without deleting any section. We need all the information we can, to be able to help. Make sure to at least provide - Current behaviour, Expected behaviour, A way to reproduce the issue with minimal code (link to [snack.expo.dev](https://snack.expo.dev)) or a repo on GitHub, and the information about your environment (such as the platform of the device, versions of all the packages etc.)."
37+
})
1738
1839
needs-repro:
1940
runs-on: ubuntu-latest
2041
if: github.event.label.name == 'needs repro'
2142
steps:
22-
- uses: actions/checkout@master
23-
- uses: actions/[email protected]
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
44+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
2645
with:
27-
args: comment "Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on [snack.expo.dev](https://snack.expo.dev). If it's not possible to repro it on [snack.expo.dev](https://snack.expo.dev), then you can also provide the repro in a GitHub repository."
46+
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
script: |
48+
const actor = context.actor;
49+
const { data: collaborators } = await github.rest.repos.listCollaborators({
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
});
53+
54+
const isCollaborator = collaborators.some(collaborator => collaborator.login === actor);
55+
if (!isCollaborator) {
56+
console.log(`Actor ${actor} is not a collaborator, skipping workflow`);
57+
return;
58+
}
59+
60+
github.rest.issues.createComment({
61+
issue_number: context.issue.number,
62+
owner: context.repo.owner,
63+
repo: context.repo.repo,
64+
body: "Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on [snack.expo.dev](https://snack.expo.dev). If it's not possible to repro it on [snack.expo.dev](https://snack.expo.dev), then you can also provide the repro in a GitHub repository."
65+
})

.github/workflows/updates.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
1414

1515
- name: Setup Node.js
16-
uses: actions/setup-node@v4
16+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
1717
with:
1818
node-version-file: .nvmrc
1919

2020
- name: Setup Expo
21-
uses: expo/expo-github-action@v7
21+
uses: expo/expo-github-action@d300b960e9f91a8c59b2aaca92e89ad70b0785ac # v7
2222
with:
2323
expo-version: latest
2424
eas-version: latest
2525
token: ${{ secrets.EXPO_TOKEN }}
2626

2727
- name: Restore dependencies
2828
id: yarn-cache
29-
uses: actions/cache/restore@v4
29+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4
3030
with:
3131
path: '**/node_modules'
3232
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Cache dependencies
4545
if: steps.yarn-cache.outputs.cache-hit != 'true'
46-
uses: actions/cache/save@v4
46+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4
4747
with:
4848
path: '**/node_modules'
4949
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}

.github/workflows/versions.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ on:
33
issues:
44
types: [opened, edited]
55

6+
permissions:
7+
contents: read
8+
issues: write
9+
610
jobs:
711
check-versions:
812
if: ${{ github.event.label.name == 'bug' }}
913
runs-on: ubuntu-latest
1014
steps:
11-
- uses: react-navigation/[email protected]
15+
- uses: react-navigation/check-versions-action@deac0a153b834fdda425028be69b2cf786dacc31 # v1.1.0
1216
with:
1317
github-token: ${{ secrets.GITHUB_TOKEN }}
1418
required-packages: |

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ After you're done, you can run `yarn example start` in the project root (or `npx
6565

6666
To run the example on web, run `yarn example web` in the project root.
6767

68+
### Testing a specific pull request/commit
69+
70+
If you want to test the changes brought by a pull request, you can do so by pointing at the git-commit or branch in your `package.json` file. For example:
71+
72+
```json
73+
{
74+
"dependencies": {
75+
"react-native-paper": "git+https://github.com/callstack/react-native-paper.git#<commit-hash>",
76+
}
77+
}
78+
```
79+
80+
Then run `yarn install`/`npm install` in your project to install the package from the git repository.
81+
82+
Alternatively, you may clone the `react-native-paper` repo and use the [yalc](https://github.com/wclr/yalc) tool to link the package to the project.
83+
6884
### Working on documentation
6985

7086
The documentation is automatically generated from the [TypeScript](https://www.typescriptlang.org/) annotations in the components. You can add comments above the type annotations to add descriptions. To preview the generated documentation, run `yarn docs start` in the project root.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<p align="center">
2-
<img alt="react-native-paper" src="docs/static/images/paper-logo.svg?sanitize=true" width="300">
3-
</p>
4-
<p align="center">
1+
<a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=react-native-paper" align="center">
2+
<img alt="react-native-paper" src="https://github.com/user-attachments/assets/5c62c47c-7991-4189-be21-614d4ffa9029">
3+
</a>
4+
<h3 align="center">
55
Material design for React Native.<br/>
66
<a href="https://reactnativepaper.com">reactnativepaper.com</a>
7-
</p>
7+
</h3>
88

99
---
1010

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"file-loader": "^6.2.0",
3535
"react": "18.3.1",
3636
"react-dom": "18.3.1",
37-
"react-native": "0.77.0",
37+
"react-native": "0.77.2",
3838
"react-native-gesture-handler": "~2.22.0",
3939
"react-native-monorepo-config": "^0.1.6",
4040
"react-native-reanimated": "~3.16.7",

0 commit comments

Comments
 (0)