Skip to content

Commit

Permalink
Update make-it-taylors-version.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ipc103 authored Jan 31, 2024
1 parent ed0f801 commit 7c94995
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/make-it-taylors-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@ jobs:
item = context.payload.discussion;
type = 'discussion';
}
if (item.number !== 1989 && item.title.indexOf("Taylor's Version") === -1) {
if (item.number !== 1989) {
return;
}
if (item.title.indexOf("Taylor's Version") !== -1) {
return;
}
// Update the issue, pull_request, or discussion title to be "#{title} (Taylor's Version)"
if (type === 'issue'){
github.rest.issues.update({
Expand All @@ -57,7 +62,7 @@ jobs:
})
} else if (type === 'discussion'){
console.log(item)
// Update the discussion title via the GraphQL API since REST seems unavailable
// Update the discussion title via the GraphQL API
const query = `mutation {
updateDiscussion(input: {discussionId: "${item.node_id}", title: "${item.title} (Taylor's Version)"}) {
discussion {
Expand All @@ -66,4 +71,4 @@ jobs:
}
}`;
github.graphql(query);
}
}

0 comments on commit 7c94995

Please sign in to comment.