Skip to content

Commit

Permalink
Update propogate-hacktoberfest-labels.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
blackgirlbytes authored Sep 30, 2024
1 parent 05c6343 commit 2bb7f72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/propogate-hacktoberfest-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,25 @@ jobs:
uses: actions/github-script@v6
id: issue_labels
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # This ensures you're authenticated to the GitHub API
script: |
const issue_number = ${{ steps.issue_number.outputs.issue_number }};
const { data: issue } = await github.issues.get({
const issue = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number
});
return issue.labels.map(label => label.name);
return issue.data.labels.map(label => label.name);
- name: Add labels to PR
if: steps.issue_number.outputs.issue_number != ''
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr_number = context.issue.number;
const labels = ${{ steps.issue_labels.outputs.result }};
await github.issues.addLabels({
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
Expand Down

0 comments on commit 2bb7f72

Please sign in to comment.