Skip to content
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
23 changes: 23 additions & 0 deletions .github/workflows/test-issue-on-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test Issue Close Trigger
permissions:
contents: read
on:
issues:
types: [closed]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Print closed issue info
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
echo "Issue Number: $ISSUE_NUMBER"
# Prevent workflow command injection from untrusted issue titles
TOKEN=$(uuidgen)
echo "::stop-commands::${TOKEN}"
echo "Title: $ISSUE_TITLE"
echo "::${TOKEN}::"
echo "Workflow triggered successfully when issue was closed."
39 changes: 39 additions & 0 deletions .github/workflows/update-issue-on-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Set Project Closed Date

on:
issues:
types: [closed]

permissions:
contents: read
issues: read

env:
PROJECT_URL: https://github.com/orgs/blinklabs-io/projects/11
CLOSED_DATE_FIELD: "Closed Date"

jobs:
set-date:
runs-on: ubuntu-latest
steps:
- name: Resolve closed date
id: when
shell: bash
run: |
ts='${{ github.event.issue.closed_at }}'
if [ -z "$ts" ] || [ "$ts" = "null" ]; then
d=$(date -u +%F)
else
d=$(date -u -d "$ts" +%F)
fi
echo "date=$d" >> "$GITHUB_OUTPUT"
echo "Closed date -> $d"

# Update the "Closed Date" field on that project item
- name: Update Closed Date field
uses: nipe0324/update-project-v2-item-field@c4af58452d1c5a788c1ea4f20e073fa722ec4a6b
with:
project-url: ${{ env.PROJECT_URL }}
github-token: ${{ secrets.ORG_PROJECT_PAT }}
field-name: ${{ env.CLOSED_DATE_FIELD }}
field-value: ${{ steps.when.outputs.date }}