Skip to content

Commit 474c0ed

Browse files
blakeffacebook-github-bot
authored andcommitted
ci: Add unsupported-version label action (#35849)
Summary: Pull Request resolved: #35849 Users will provide issues or examples that use unsupported versions of React Native. Provide label to track and ask them to update example / issue to currently mainted version. Changelog: [Internal] - Support 'unsupported version' tag comment Reviewed By: cortinico Differential Revision: D42531703 fbshipit-source-id: 5577943a329e17147269b9e5a5da2b2c16a6ae3e
1 parent 55af2fe commit 474c0ed

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/on-issue-labeled.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,22 @@ jobs:
163163
repo: context.repo.repo,
164164
labels: ['Needs: Author Feedback']
165165
})
166+
unsupported-version:
167+
runs-on: ubuntu-latest
168+
if: "${{ contains(github.event.label.name, 'Type: Unsupported Version') }}"
169+
steps:
170+
- uses: actions/github-script@v6
171+
with:
172+
script: |
173+
await github.rest.issues.createComment({
174+
issue_number: context.issue.number,
175+
owner: context.repo.owner,
176+
repo: context.repo.repo,
177+
body: `It looks like your issue or the example you provided uses an [unsupported version of React Native](https://github.com/reactwg/react-native-releases/blob/main/README.md#releases-support-policy). Due to the amount of issues we receive, we're currently accepting only new issues against one of the supported version. Please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support.`,
178+
})
179+
await github.rest.issues.addLabels({
180+
issue_number: context.issue.number,
181+
owner: context.repo.owner,
182+
repo: context.repo.repo,
183+
labels: ['Needs: Author Feedback']
184+
})

.github/workflows/stale-bot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,18 @@ jobs:
1717
stale-pr-message: 'This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
1818
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
1919
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
20+
stale-versions:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
issues: write
24+
pull-requests: write
25+
steps:
26+
- uses: actions/stale@v5
27+
with:
28+
repo-token: ${{ secrets.GITHUB_TOKEN }}
29+
any-of-labels: 'Needs: Author Feedback'
30+
days-before-stale: 24
31+
stale-issue-message: 'This issue is stale because it has been open 24 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
32+
stale-pr-message: 'This PR is stale because it has been open 24 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
33+
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
34+
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'

0 commit comments

Comments
 (0)