Skip to content

Commit

Permalink
Merge pull request #12 from calimero-network/chore--add-action
Browse files Browse the repository at this point in the history
chore: add action
  • Loading branch information
MatejVukosav authored Oct 22, 2024
2 parents 3da75a8 + 07262aa commit d71cf4b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/actions/contributions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Needs Attention Labeler"
description: "Applies 'needs attention' and other labels to PRs or issues"
inputs:
repo-token:
description: "GitHub token with repository permissions"
required: true
response-required-label:
description: "Label to apply when response is required"
required: true
needs-attention-label:
description: "Label to apply when attention is needed"
required: true
outputs:
result:
description: "Result of the labeling action"
value: ${{ steps.needs-attention.outputs.result }}
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Apply Needs Attention Label
uses: hramos/[email protected]
with:
repo-token: ${{ inputs.repo-token }}
response-required-label: ${{ inputs.response-required-label }}
needs-attention-label: ${{ inputs.needs-attention-label }}
id: needs-attention

- name: Set output result
shell: bash
run: echo "result=${{ steps.needs-attention.outputs.result }}" >> $GITHUB_OUTPUT
9 changes: 4 additions & 5 deletions .github/workflows/contributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ on:
jobs:
applyNeedsAttentionLabel:
name: Apply Needs Attention
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
issues: write # for hramos/needs-attention to label issues
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Label PRs for Triage
uses: hramos/needs-attention@v2.0.0
- name: Apply Needs Attention Label
id: needs-attention
uses: ./.github/actions/needs-attention-labeler
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
response-required-label: "waiting-for-author-feedback"
needs-attention-label: "needs-team-review"
id: needs-attention
- name: Result
run: echo '${{ steps.needs-attention.outputs.result }}'

0 comments on commit d71cf4b

Please sign in to comment.