mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-28 03:21:26 -08:00
chore(actions): only run on opened pr
This commit is contained in:
parent
80393bf504
commit
9d6b5748b3
7
.github/workflows/close_themes_pr.yml
vendored
7
.github/workflows/close_themes_pr.yml
vendored
|
@ -1,10 +1,11 @@
|
||||||
name: Close Themes PR
|
name: Close Themes PR
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, reopened, edited]
|
types:
|
||||||
|
- opened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code 👋
|
- 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.`
|
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({
|
await github.rest.issues.createComment({
|
||||||
owner, repo,
|
owner, repo,
|
||||||
issue_number: pr.number,
|
issue_number: pr.number,
|
||||||
body,
|
body,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(`Closing pull request: ${pr.html_url}`);
|
||||||
await github.rest.pulls.update({
|
await github.rest.pulls.update({
|
||||||
owner, repo,
|
owner, repo,
|
||||||
pull_number: pr.number,
|
pull_number: pr.number,
|
||||||
|
|
Loading…
Reference in a new issue