mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:20:11 +01:00
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/#:~:text=The%20main%20differences%20between%20the,but%20not%20from%20external%20forks. I'm hoping I actually have the cause of my issues right this time.
95 lines
3.0 KiB
YAML
95 lines
3.0 KiB
YAML
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
# Applies mutual exclusivity between states labels:
|
|
# - proposal draft
|
|
# - proposal rfc
|
|
# - proposal accepted
|
|
# - proposal declined
|
|
# - proposal deferred
|
|
#
|
|
# The "proposal" label is always applied in order to make searching for all
|
|
# proposals (regardless of state) easy, although it will typically already be
|
|
# present.
|
|
|
|
name: Proposal labeled
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- labeled
|
|
|
|
jobs:
|
|
proposal_labeled:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: draft
|
|
if: |
|
|
github.event.label.name == 'proposal draft'
|
|
run: |
|
|
gh pr edit "${PR}" \
|
|
--remove-label "proposal rfc" \
|
|
--remove-label "proposal accepted" \
|
|
--remove-label "proposal declined" \
|
|
--remove-label "proposal deferred" \
|
|
--add-label "proposal"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR: ${{ github.event.pull_request.html_url }}
|
|
|
|
- name: rfc
|
|
if: |
|
|
github.event.label.name == 'proposal rfc'
|
|
run: |
|
|
gh pr edit "${PR}" \
|
|
--remove-label "proposal draft" \
|
|
--remove-label "proposal accepted" \
|
|
--remove-label "proposal declined" \
|
|
--remove-label "proposal deferred" \
|
|
--add-label "proposal"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR: ${{ github.event.pull_request.html_url }}
|
|
|
|
- name: accepted
|
|
if: |
|
|
github.event.label.name == 'proposal accepted'
|
|
run: |
|
|
gh pr edit "${PR}" \
|
|
--remove-label "proposal draft" \
|
|
--remove-label "proposal rfc" \
|
|
--remove-label "proposal declined" \
|
|
--remove-label "proposal deferred" \
|
|
--add-label "proposal"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR: ${{ github.event.pull_request.html_url }}
|
|
|
|
- name: declined
|
|
if: |
|
|
github.event.label.name == 'proposal declined'
|
|
run: |
|
|
gh pr edit "${PR}" \
|
|
--remove-label "proposal draft" \
|
|
--remove-label "proposal rfc" \
|
|
--remove-label "proposal accepted" \
|
|
--remove-label "proposal deferred" \
|
|
--add-label "proposal"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR: ${{ github.event.pull_request.html_url }}
|
|
|
|
- name: deferred
|
|
if: |
|
|
github.event.label.name == 'proposal deferred'
|
|
run: |
|
|
gh pr edit "${PR}" \
|
|
--remove-label "proposal draft" \
|
|
--remove-label "proposal rfc" \
|
|
--remove-label "proposal accepted" \
|
|
--remove-label "proposal declined" \
|
|
--add-label "proposal"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR: ${{ github.event.pull_request.html_url }}
|