|
41 | 41 |
|
42 | 42 | return response.data.names.includes('exercism-tooling'); |
43 | 43 |
|
| 44 | + - name: Check if repo is unmaintained repo |
| 45 | + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea |
| 46 | + if: steps.repo-requires-ping.outputs.result == 'true' |
| 47 | + id: is-unmaintained-repo |
| 48 | + with: |
| 49 | + script: | |
| 50 | + const response = await github.rest.repos.getAllTopics({ |
| 51 | + owner: context.repo.owner, |
| 52 | + repo: context.repo.repo, |
| 53 | + }); |
| 54 | +
|
| 55 | + return response.data.names.includes('unmaintained'); |
| 56 | +
|
44 | 57 | - name: Check if PR author is member of cross-track-maintainers team |
45 | 58 | uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea |
46 | 59 | if: steps.repo-requires-ping.outputs.result == 'true' && steps.is-tooling-repo.outputs.result == 'false' |
@@ -91,6 +104,18 @@ jobs: |
91 | 104 | body: `Hello 👋 Thanks for your PR.\n\nThis repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed.\n\nIf you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track.\n\nPlease feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the [Exercism forum](https://exercism.org/r/forum).\n\n_(cc @exercism/cross-track-maintainers)_` |
92 | 105 | }) |
93 | 106 |
|
| 107 | + - name: Create cross-track-maintainers team unmaintained repo comment |
| 108 | + if: steps.repo-requires-ping.outputs.result == 'true' && steps.is-tooling-repo.outputs.result == 'false' && steps.is-unmaintained-repo.outputs.result == 'true' && steps.author-is-member-cross-track-maintainers-team.outputs.result == 'false' |
| 109 | + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea |
| 110 | + with: |
| 111 | + script: | |
| 112 | + github.rest.issues.createComment({ |
| 113 | + issue_number: context.issue.number, |
| 114 | + owner: context.repo.owner, |
| 115 | + repo: context.repo.repo, |
| 116 | + body: `This is an unmaintained repository.\n\nCross-track maintainers - feel free to merge.` |
| 117 | + }) |
| 118 | +
|
94 | 119 | - name: Create guardians team ping comment |
95 | 120 | if: steps.repo-requires-ping.outputs.result == 'true' && steps.is-tooling-repo.outputs.result == 'true' && steps.author-is-member-guardians-team.outputs.result == 'false' |
96 | 121 | uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea |
|
0 commit comments