Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment for cross-track maintainers for unmaintained repos #196

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ping-cross-track-maintainers-team.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ jobs:

return response.data.names.includes('exercism-tooling');

- name: Check if repo is unmaintained repo
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
if: steps.repo-requires-ping.outputs.result == 'true'
id: is-unmaintained-repo
with:
script: |
const response = await github.rest.repos.getAllTopics({
owner: context.repo.owner,
repo: context.repo.repo,
});

return response.data.names.includes('unmaintained');

- name: Check if PR author is member of cross-track-maintainers team
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
if: steps.repo-requires-ping.outputs.result == 'true' && steps.is-tooling-repo.outputs.result == 'false'
Expand Down Expand Up @@ -91,6 +104,18 @@ jobs:
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)_`
})

- name: Create cross-track-maintainers team unmaintained repo comment
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'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `This is an unmaintained repository.\n\nCross-track maintainers - feel free to merge.`
})

- name: Create guardians team ping comment
if: steps.repo-requires-ping.outputs.result == 'true' && steps.is-tooling-repo.outputs.result == 'true' && steps.author-is-member-guardians-team.outputs.result == 'false'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
Expand Down