chore(actions): only run on opened pr

This commit is contained in:
Jan De Dobbeleer 2022-10-21 14:27:46 +02:00
parent 80393bf504
commit 9d6b5748b3
No known key found for this signature in database
GPG key ID: D9FE64756B9A61E6

View file

@ -1,10 +1,11 @@
name: Close Themes PR
on:
pull_request_target:
types: [opened, reopened, edited]
types:
- opened
jobs:
publish:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code 👋
@ -45,12 +46,14 @@ jobs:
const body = `👋 @${pr.user.login}, theme aditions are no longer accepted due to the ever growing set. We do however accept showcasing your custom theme in the [🎨 Themes section](https://github.com/JanDeDobbeleer/oh-my-posh/discussions/categories/themes) in discussions.`
console.log(`Adding comment: ${body}`);
await github.rest.issues.createComment({
owner, repo,
issue_number: pr.number,
body,
});
console.log(`Closing pull request: ${pr.html_url}`);
await github.rest.pulls.update({
owner, repo,
pull_number: pr.number,