Skip to content

Commit

Permalink
create add-contributor-on-issue.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dinxsh authored Jul 28, 2024
1 parent 20ee2d2 commit 5d0ff66
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/add-contributor-on-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Add Contributor on Issue

on:
issues:
types: [opened]

jobs:
add-contributor:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Run script to add contributor
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install -g jsonfile
node .github/scripts/addContributor.js "${{ github.event.issue.user.login }}" "${{ github.event.issue.body }}"
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Add contributor: ${{ github.event.issue.user.login }}"
git push

0 comments on commit 5d0ff66

Please sign in to comment.