| | name: Repo gardening |
| |
|
| | on: |
| | pull_request_target: |
| | types: [opened, reopened, synchronize, edited, labeled, closed] |
| | concurrency: |
| | |
| | |
| | group: gardening-${{ github.event_name }}-${{ github.event.action }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.run_id }} |
| | cancel-in-progress: true |
| |
|
| | jobs: |
| | repo-gardening: |
| | name: 'Clean up PR labels, notify Design/Editorial when necessary, and flag OSS PRs' |
| | runs-on: ubuntu-latest |
| | if: github.event_name == 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name |
| | timeout-minutes: 60 |
| |
|
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@v3 |
| |
|
| | - name: Setup Node |
| | uses: actions/setup-node@v3 |
| | with: |
| | node-version-file: '.nvmrc' |
| |
|
| | - name: Wait for prior instances of the workflow to finish |
| | uses: softprops/turnstyle@v2 |
| | env: |
| | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| |
|
| | - name: 'Run gardening action' |
| | uses: automattic/action-repo-gardening@trunk |
| | with: |
| | github_token: ${{ secrets.GITHUB_TOKEN }} |
| | slack_token: ${{ secrets.SLACK_TOKEN }} |
| | slack_design_channel: ${{ secrets.SLACK_DESIGN_CHANNEL }} |
| | slack_editorial_channel: ${{ secrets.SLACK_EDITORIAL_CHANNEL }} |
| | slack_team_channel: ${{ secrets.SLACK_TEAM_CHANNEL }} |
| | tasks: 'cleanLabels,notifyDesign,notifyEditorial,flagOss' |
| |
|