forked from space-syndicate/space-station-14
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c92b01e0b6 | ||
|
|
0cc69abd68 |
14
.github/workflows/labeler-approve.yml
vendored
14
.github/workflows/labeler-approve.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: "Labels: Approve"
|
||||
name: "Labels: Approve"
|
||||
|
||||
on:
|
||||
pull_request_review:
|
||||
@@ -11,8 +11,10 @@ jobs:
|
||||
if: github.event.review.state == 'approved'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-ecosystem/action-remove-labels@v1
|
||||
with:
|
||||
labels: |
|
||||
Status: Needs Review
|
||||
Status: Awaiting Changes
|
||||
- name: Remove review labels
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
|
||||
curl -sS -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/Status%3A%20Needs%20Review" || true
|
||||
curl -sS -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/Status%3A%20Awaiting%20Changes" || true
|
||||
|
||||
16
.github/workflows/labeler-changes.yml
vendored
16
.github/workflows/labeler-changes.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: "Labels: Changes"
|
||||
name: "Labels: Changes"
|
||||
|
||||
on:
|
||||
pull_request_review:
|
||||
@@ -11,9 +11,11 @@ jobs:
|
||||
if: github.event.review.state == 'changes_requested'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-ecosystem/action-add-labels@v1
|
||||
with:
|
||||
labels: "Status: Awaiting Changes"
|
||||
- uses: actions-ecosystem/action-remove-labels@v1
|
||||
with:
|
||||
labels: "Status: Needs Review"
|
||||
- name: Update labels
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
|
||||
curl -sS -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" \
|
||||
-d '{"labels":["Status: Awaiting Changes"]}' "$API"
|
||||
curl -sS -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/Status%3A%20Needs%20Review" || true
|
||||
|
||||
4
.github/workflows/labeler-conflict.yml
vendored
4
.github/workflows/labeler-conflict.yml
vendored
@@ -57,8 +57,10 @@ jobs:
|
||||
|
||||
if [ -n "$HAS_LABEL" ]; then
|
||||
echo "Removing stale conflict label..."
|
||||
# URL-encode the label name (handles spaces, colons, etc.)
|
||||
LABEL_NAME_ENCODED=$(echo "$LABEL_NAME" | jq -rR @uri)
|
||||
curl -s -X DELETE -H "Authorization: token $API_TOKEN" \
|
||||
"$API_URL/repos/$REPO_OWNER/$REPO_NAME/issues/$PR_INDEX/labels/$LABEL_NAME"
|
||||
"$API_URL/repos/$REPO_OWNER/$REPO_NAME/issues/$PR_INDEX/labels/$LABEL_NAME_ENCODED"
|
||||
echo "Conflict label removed."
|
||||
fi
|
||||
fi
|
||||
|
||||
16
.github/workflows/labeler-needsreview.yml
vendored
16
.github/workflows/labeler-needsreview.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: "Labels: Review"
|
||||
name: "Labels: Review"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
@@ -8,9 +8,11 @@ jobs:
|
||||
add_label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-ecosystem/action-add-labels@v1
|
||||
with:
|
||||
labels: "S: Needs Review"
|
||||
- uses: actions-ecosystem/action-remove-labels@v1
|
||||
with:
|
||||
labels: "S: Awaiting Changes"
|
||||
- name: Update labels
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
|
||||
curl -sS -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/json" \
|
||||
-d '{"labels":["S: Needs Review"]}' "$API"
|
||||
curl -sS -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$API/S%3A%20Awaiting%20Changes" || true
|
||||
|
||||
23
.github/workflows/labeler-review.yml
vendored
23
.github/workflows/labeler-review.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: "Labels: Approved"
|
||||
on:
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
jobs:
|
||||
add_label:
|
||||
# Change the repository name after you've made sure the team name is correct for your fork!
|
||||
if: ${{ (github.repository == 'space-wizards/space-station-14') && (github.event.review.state == 'APPROVED') }}
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: tspascoal/get-user-teams-membership@v3
|
||||
id: checkUserMember
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
team: "content-maintainers,junior-maintainers"
|
||||
GITHUB_TOKEN: ${{ secrets.LABELER_PAT }}
|
||||
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }}
|
||||
uses: actions-ecosystem/action-add-labels@v1
|
||||
with:
|
||||
labels: "S: Approved"
|
||||
12
.github/workflows/labeler-stable.yml
vendored
12
.github/workflows/labeler-stable.yml
vendored
@@ -11,6 +11,12 @@ jobs:
|
||||
add_label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-ecosystem/action-add-labels@v1
|
||||
with:
|
||||
labels: "Branch: Stable"
|
||||
- name: Add branch label
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
curl -sS -X POST \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"labels":["Branch: Stable"]}' \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
|
||||
|
||||
12
.github/workflows/labeler-staging.yml
vendored
12
.github/workflows/labeler-staging.yml
vendored
@@ -11,6 +11,12 @@ jobs:
|
||||
add_label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-ecosystem/action-add-labels@v1
|
||||
with:
|
||||
labels: "Branch: Staging"
|
||||
- name: Add branch label
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
curl -sS -X POST \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"labels":["Branch: Staging"]}' \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
|
||||
|
||||
17
.github/workflows/labeler-untriaged.yml
vendored
17
.github/workflows/labeler-untriaged.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: "Labels: Untriaged"
|
||||
name: "Labels: Untriaged"
|
||||
|
||||
on:
|
||||
issues:
|
||||
@@ -10,7 +10,14 @@ jobs:
|
||||
add_label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-ecosystem/action-add-labels@v1
|
||||
if: join(github.event.issue.labels) == ''
|
||||
with:
|
||||
labels: "S: Untriaged"
|
||||
- name: Add untriaged label
|
||||
if: github.event.issue.labels[0] == null || github.event.pull_request.labels[0] == null
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
NUMBER="${{ github.event.pull_request.number || github.event.issue.number }}"
|
||||
curl -sS -X POST \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"labels":["S: Untriaged"]}' \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/issues/$NUMBER/labels"
|
||||
|
||||
Reference in New Issue
Block a user