Skip to content

The State of Open Source in 2026 #7

The State of Open Source in 2026

The State of Open Source in 2026 #7

name: check-event-submission
on:
issues:
types:
- opened
- edited
- reopened
permissions:
contents: read
issues: write
jobs:
check-event-submission:
if: github.event.issue.body && contains(github.event.issue.body, '### Event Name') && contains(github.event.issue.body, '### Event Date')
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Ensure workflow labels
run: |
gh label create "add event" \
--color 5319E7 \
--description "Event submission issue" \
|| true
gh label create approved-for-calendar \
--color 0E8A16 \
--description "Approved to generate a calendar event PR" \
|| true
gh label create calendar-pr-created \
--color 0E8A16 \
--description "A calendar event PR has been created for this issue" \
|| true
gh label create needs-info \
--color D93F0B \
--description "More information is needed before this event can be added" \
|| true
- name: Validate event submission
id: validate
continue-on-error: true
run: |
node scripts/event-from-issue.js \
--repo "$GITHUB_REPOSITORY" \
--issue "$ISSUE_NUMBER" \
--output-dir "$RUNNER_TEMP/events" \
--summary-file "$RUNNER_TEMP/event-pr-body.md"
- name: Mark valid event submission
if: steps.validate.outcome == 'success'
run: |
gh issue edit "$ISSUE_NUMBER" --add-label "add event"
gh issue edit "$ISSUE_NUMBER" --remove-label needs-info || true
- name: Mark issue as needing info
if: steps.validate.outcome == 'failure'
run: |
gh issue edit "$ISSUE_NUMBER" --add-label "add event"
gh issue edit "$ISSUE_NUMBER" --add-label needs-info
gh issue edit "$ISSUE_NUMBER" --remove-label approved-for-calendar || true
exit 1