Skip to content

Commit

Permalink
.github: update label from grooming to triage (cosmos#949)
Browse files Browse the repository at this point in the history
Updates to housekeeping flow based on discussions in the grooming
session
  • Loading branch information
MSevey authored Jun 2, 2023
1 parent c0bcb89 commit 9de1bca
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,30 @@ on:
types: [opened]

jobs:
project:
# ignore dependabot PRs
if: ${{ github.actor != 'dependabot[bot]' }}
name: Add issues and PRs to project and add grooming label
issue-management:
if: ${{ github.event.issue }}
name: Add issues to project and add triage label
uses: rollkit/.github/.github/workflows/reusable_housekeeping.yml@v0.1.1
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-labels: true
labels-to-add: "needs-grooming"
labels-to-add: "needs-triage"
run-projects: true
project-url: https://github.com/orgs/rollkit/projects/7

add-pr-to-project:
# ignore dependabot PRs
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
name: Add PRs to project
uses: celestiaorg/.github/.github/workflows/reusable_housekeeping.yml@v0.1.1
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-projects: true
project-url: https://github.com/orgs/rollkit/projects/7

Expand All @@ -35,37 +47,27 @@ jobs:

auto-add-assignee:
# ignore dependabot PRs
if: ${{ github.actor != 'dependabot[bot]' }}
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
name: Assign issue and PR to creator
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Set issue url and creator login
if: ${{ github.event.issue }}
run: |
echo "ISSUE=${{ github.event.issue.html_url }}" >> $GITHUB_ENV
echo "CREATOR=${{ github.event.issue.user.login }}" >> $GITHUB_ENV
- name: Set pull_request url and creator login
if: ${{ github.event.pull_request }}
# yamllint disable rule:line-length
run: |
echo "PR=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
echo "CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
# yamllint enable rule:line-length
- name: Assign issue to creator (issue)
if: ${{ github.event.issue }}
run: gh issue edit ${{ env.ISSUE }} --add-assignee ${{ env.CREATOR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Assign issue to creator (PR)
if: ${{ github.event.pull_request }}
- name: Assign PR to creator
run: gh pr edit ${{ env.PR }} --add-assignee ${{ env.CREATOR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

required-labels:
# ignore dependabot PRs
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v4
Expand Down

0 comments on commit 9de1bca

Please sign in to comment.