Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ipc103 committed Jan 30, 2024
0 parents commit a405a7a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/make-it-taylors-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Make it Taylor's Version

permissions:
issues: write
pull-requests: write
discussions: write

on:
issues:
types:
- opened
pull_request:
types:
- opened
discussion:
types:
- created

jobs:
add-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
let number = -1;
let type = '';
if (context.payload.issue) {
number = context.payload.issue.number;
type = "issue"
} else if (context.payload.pull_request) {
number = context.payload.pull_request.number;
type = "pull_request"
} else if (context.payload.discussion) {
number = context.payload.discussion.number;
type = "discussion"
}
if (number !== 1989){
return;
}
// Update the issue, pull_request, or discussion title to be "#{title} (Taylor's Version)"
github.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: number,
title: `${context.payload[type].title} (Taylor's Version)`
})
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Make it Taylor's Version

GitHub Action to edit any Issue, Pull Request, or Discussion title with the number 1989 from "Title" to "Title (Taylor's Version)."

### FAQ

**Is this a joke?**

Yes.

**But does it work?**

I think so.

0 comments on commit a405a7a

Please sign in to comment.