Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ci: auto mark pr from forks as community #105

Merged
merged 2 commits into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!--
Thanks for contributing to 2ms by offering a pull request.
Please add a "community" tag if you're an external contributor.
-->

Closes #
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Labels

on:
pull_request_target:
types: [opened]

jobs:
mark_as_community:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Mark as Community if PR is from a fork
if: github.event.pull_request.head.repo.full_name != github.repository
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Community']
})