Skip to content

Commit

Permalink
added auto labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushi0508 authored Sep 24, 2023
1 parent e1751ae commit 29c15fc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/add_labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Add Labels to New Issues

on:
issues:
types:
- opened

jobs:
add_labels:
runs-on: ubuntu-latest

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

- name: Add labels to issue
uses: actions/github-script@v5
with:
script: |
const labelsToAdd = ["hacktoberfest"]; // Add your desired labels here
const issue = github.context.payload.issue;
const owner = issue.repository.owner.login;
const repo = issue.repository.name;
await github.issues.addLabels({
owner,
repo,
issue_number: issue.number,
labels: labelsToAdd,
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 29c15fc

Please sign in to comment.