Fixing Tabs redirection issue in interview prep for three tabs in practice tab #279
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Label Issues and PRs | |
on: | |
pull_request_target: | |
types: [opened] | |
issues: | |
types: [opened] | |
permissions: | |
issues: write | |
pull-requests: write | |
jobs: | |
add-labels: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Add labels to PR | |
if: github.event_name == 'pull_request_target' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const prNumber = context.payload.pull_request.number; | |
await github.rest.issues.addLabels({ | |
...context.repo, | |
issue_number: prNumber, | |
labels: ["recode", "level 1", "hacktoberfest-accepted"] | |
}); | |
console.log(`Added labels [recode, level 1,hacktoberfest-accepted] to PR #${prNumber}`); | |
- name: Add labels to Issue | |
if: github.event_name == 'issues' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const issueNumber = context.payload.issue.number; | |
await github.rest.issues.addLabels({ | |
...context.repo, | |
issue_number: issueNumber, | |
labels: ["recode", "level 1", "hacktoberfest-accepted"] | |
}); | |
console.log(`Added labels [recode, level 1, hacktoberfest-accepted] to Issue #${issueNumber}`); |