Skip to content

Commit

Permalink
Merge pull request #80 from c0sm0void/c0sm0void-patch-1
Browse files Browse the repository at this point in the history
Update labeler.yml
  • Loading branch information
c0sm0void authored Oct 13, 2024
2 parents c1c1a6e + 8d91776 commit 4b73fe4
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Git credentials
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --stdin --scopes=issues,repo

- name: Label issues and PRs
id: add_labels
uses: actions/github-script@v6
Expand Down Expand Up @@ -50,13 +53,22 @@ jobs:
console.log('Labels to add:', labels);
if (labels.length > 0) {
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: labels
});
} else {
console.log('No labels to add.');
try {
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: labels
});
console.log('Labels added successfully.');
} else {
console.log('No labels to add.');
}
} catch (error) {
console.error('Error adding labels:', error);
throw error;
}
- name: Log output
run: echo ${{ steps.add_labels.outputs.output }}

0 comments on commit 4b73fe4

Please sign in to comment.