mirror of
https://github.com/sunrin-ana/2025-SSF.git
synced 2026-03-09 18:40:02 +00:00
2025 SSF Public
This commit is contained in:
commit
76a02076c9
192 changed files with 5016 additions and 0 deletions
40
.github/workflows/issue_or_pr.yml.disabled
vendored
Normal file
40
.github/workflows/issue_or_pr.yml.disabled
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: Issue or PR Label
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
add-label:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check if issue or PR is opened
|
||||
id: check
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "issues" ]]; then
|
||||
echo "type=issue" >> $GITHUB_OUTPUT
|
||||
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
echo "type=pull_request" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "type=unknown" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Add label to issue or PR
|
||||
if: steps.check.outputs.type == 'issue' || steps.check.outputs.type == 'pull_request'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_TOKEN }}
|
||||
script: |
|
||||
const label = steps.check.outputs.type === 'issue' ? 'type: issue' : 'type: pull request';
|
||||
await github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
labels: [label]
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue