This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
Project Management #1717
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Project Management | |
concurrency: | |
group: ${{ github.event.issue.number || github.ref }} | |
cancel-in-progress: false | |
on: | |
issue_comment: | |
types: | |
- created | |
- edited | |
issues: | |
types: | |
- opened | |
- unlabeled | |
- assigned | |
- unassigned | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
assign-issue-to-contributor: | |
name: Assign Issue to Contributor | |
if: github.event_name == 'issue_comment' && !github.event.issue.pull_request && !contains(github.event.issue.labels.*.name, 'Triage') && github.event.issue.state == 'open' | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github/actions | |
sparse-checkout-cone-mode: false | |
- name: Assign issue | |
uses: bdougie/take-action@main | |
with: | |
message: Danke, dass Du diese Aufgabe übernimmst! Falls Du Fragen hast, schreib sie einfach ins Issue! | |
issueCurrentlyAssignedMessage: Die Aufgabe wird aktuell bereits von jemand anderem bearbeitet, daher kannst Du Dir diese leider nicht selbst zuweisen. | |
trigger: .meine-aufgabe | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- id: assignee-count | |
run: | | |
count=$(gh issue view $ISSUE_ID --json assignees | jq -e '.assignees | length') | |
echo "count=$count" >> "$GITHUB_OUTPUT" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ISSUE_ID: ${{ github.event.issue.number }} | |
- uses: ./.github/actions/move-issue | |
if: steps.assignee-count.outputs.count > 0 | |
with: | |
app-id: ${{ secrets.COMMUNITY_APP_ID }} | |
private-key: ${{ secrets.COMMUNITY_APP_PEM }} | |
issue-id: ${{ github.event.issue.node_id }} | |
column: In Progress | |
move-new-issues-to-triage-column: | |
name: Move new issues to triage column | |
if: github.event_name == 'issues' && github.event.action == 'opened' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Bhacaz/checkout-files@v2 | |
with: | |
files: .github/actions | |
- uses: ./.github/actions/move-issue | |
with: | |
app-id: ${{ secrets.COMMUNITY_APP_ID }} | |
private-key: ${{ secrets.COMMUNITY_APP_PEM }} | |
issue-id: ${{ github.event.issue.node_id }} | |
column: Triage | |
move-issue-to-todo-column-when-triage-label-is-removed: | |
name: Move an issue to the Todo column when triage label is removed | |
if: github.event_name == 'issues' && github.event.action == 'unlabeled' && github.event.label.name == 'Triage' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Bhacaz/checkout-files@v2 | |
with: | |
files: .github/actions | |
- uses: ./.github/actions/move-issue | |
with: | |
app-id: ${{ secrets.COMMUNITY_APP_ID }} | |
private-key: ${{ secrets.COMMUNITY_APP_PEM }} | |
issue-id: ${{ github.event.issue.node_id }} | |
column: Todo | |
move-issue-to-in-progress-on-assign: | |
name: Move an issue to in progress when it is assigned. | |
if: github.event_name == 'issues' && github.event.action == 'assigned' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Bhacaz/checkout-files@v2 | |
with: | |
files: .github/actions | |
- uses: ./.github/actions/move-issue | |
with: | |
app-id: ${{ secrets.COMMUNITY_APP_ID }} | |
private-key: ${{ secrets.COMMUNITY_APP_PEM }} | |
issue-id: ${{ github.event.issue.node_id }} | |
column: In Progress | |
move-issue-back-to-todo-on-unassign: | |
name: Move an issue back to todo on unassign | |
if: github.event_name == 'issues' && github.event.action == 'unassigned' && !github.event.issue.assignee | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Bhacaz/checkout-files@v2 | |
with: | |
files: .github/actions | |
- uses: ./.github/actions/move-issue | |
with: | |
app-id: ${{ secrets.COMMUNITY_APP_ID }} | |
private-key: ${{ secrets.COMMUNITY_APP_PEM }} | |
issue-id: ${{ github.event.issue.node_id }} | |
column: Todo | |
comment-on-possible-stale-issues: | |
name: Comment on possible stable issues | |
if: github.event_name == 'schedule' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/stale@v6 | |
with: | |
include-only-assigned: true | |
exempt-assignees: 'ManuelRauber,M4lph' | |
days-before-stale: 7 | |
days-before-close: -1 # Never close an issue/pr | |
stale-issue-message: 'Hey! Diese Aufgabe wurde vor einigen Tagen übernommen, aber seit dem ist nichts mehr passiert. Eventuell kann der aktuelle Contributor sich dazu äußern?' | |
stale-pr-message: 'Hey! Dieser Pull Request wurde vor einigen Tagen gestellt und bedarf noch Änderungen, aber seit dem ist nichts mehr passiert. Eventuell kann der aktuelle Contributor sich dazu äußern?' | |
stale-issue-label: 'Wartet auf Contributor' | |
stale-pr-label: 'Wartet auf Contributor' | |
exempt-issue-labels: 'Blockiert' | |
exempt-pr-labels: 'Blockiert' | |
remove-stale-when-updated: true | |
unassign-issues-labeled-waiting-for-contributor-after-7-days-of-inactivity: | |
name: Unassign issues labeled "Wartet auf Contributor" after 7 days of inactivity. | |
if: github.event_name == 'schedule' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: boundfoxstudios/action-unassign-contributor-after-days-of-inactivity@v1 | |
with: | |
last-activity: 7 | |
labels: 'Wartet auf Contributor' | |
exempt-assignees: 'ManuelRauber,M4lph' | |
labels-to-remove: 'Wartet auf Contributor' | |
message: 'Aufgrund längerer Inaktivität wurde diese Aufgabe automatisch zurückgeben.' |