Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ”€ :: (#1112) develop์ด ์•„๋‹Œ ๋ธŒ๋žœ์น˜๋ฅผ ๋Œ€์ƒ์œผ๋กœ PR ๋จธ์ง€ ์‹œ ์—ฐ๊ด€๋œ ์ด์Šˆ ์ž๋™์œผ๋กœ close #1120

Merged
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
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
## ๐Ÿ’ก ๋ฐฐ๊ฒฝ ๋ฐ ๊ฐœ์š”

<!--
> PR์„ ํ•˜๊ฒŒ ๋œ ๋ฌธ์ œ์ƒํ™ฉ, ๋ฐฐ๊ฒฝ ๋“ฑ ๊ฐœ์š”์— ๋Œ€ํ•ด์„œ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”!
>
> ํผ๋ธ”๋ฆฌ์‹ฑ์˜ ๊ฒฝ์šฐ ์Šคํฌ๋ฆฐ์ƒท/๋™์˜์ƒ๋„ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ์ข‹์•„์š”!
-->

<!-- resolved issue ๋„˜๋ฒ„ ํ‘œ๊ธฐ ๋ฐฉ์‹ ๋ณ€๊ฒฝ ์‹œ '.github/actions/Auto_close_associate_issue/main.js' ๋˜ํ•œ ๋ณ€๊ฒฝ ํ•„์š” -->

Resolves: #{์ด์Šˆ๋ฒˆํ˜ธ}

## ๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

<!--
> PR์—์„œ ํ•œ ์ž‘์—…์„ ์ž์„ธํžˆ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”!
-->

## ๐Ÿ™‹โ€โ™‚๏ธ ๋ฆฌ๋ทฐ๋…ธํŠธ

<!--
> ๊ตฌํ˜„ ์‹œ์— ๊ณ ๋ฏผ์ด์—ˆ๋˜ ์ ๋“ค ํ˜น์€ ํŠน์ • ๋ถ€๋ถ„์— ๋Œ€ํ•œ ์˜๋„๊ฐ€ ์žˆ์—ˆ๋‹ค๋ฉด PR ๋ฆฌ๋ทฐ์˜ ์ดํ•ด๋ฅผ ๋•๊ธฐ ์œ„ํ•ด ์„œ์ˆ ํ•ด์ฃผ์„ธ์š”!
>
> ๋˜ํ•œ ๋ฆฌ๋ทฐ์–ด์—๊ฒŒ ํŠน์ • ๋ถ€๋ถ„์— ๋Œ€ํ•œ ์ง‘์ค‘ ํ˜น์€ ์ฝ”๋ฉ˜ํŠธ ํ˜น์€ ์งˆ๋ฌธ์„ ์š”์ฒญํ•˜๋Š” ๊ฒฝ์šฐ์— ์ž‘์„ฑํ•˜๋ฉด ์ข‹์•„์š”!
>
> e.g. ์ž‘์—…์„ ๋๋‚ด์•ผํ•  ์‹œ๊ฐ„์ด ์–ผ๋งˆ ์—†์–ด ํ™•์žฅ์„ฑ๋ณด๋‹ค๋Š” ๋™์ž‘์„ ์œ„์ฃผ๋กœ ๋งŒ๋“ค์—ˆ์–ด์š”! ๊ฐ์•ˆํ•˜๊ณ  ๋ฆฌ๋ทฐํ•ด์ฃผ์„ธ์š”!
-->

## โœ… PR ์ฒดํฌ๋ฆฌ์ŠคํŠธ

<!--
> ํ…œํ”Œ๋ฆฟ ์ฒดํฌ๋ฆฌ์ŠคํŠธ ๋ง๊ณ ๋„ ์ถ”๊ฐ€์ ์œผ๋กœ ํ•„์š”ํ•œ ์ฒดํฌ๋ฆฌ์ŠคํŠธ๋Š” ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”!
-->

- [ ] ์ด ์ž‘์—…์œผ๋กœ ์ธํ•ด ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•œ ๋ฌธ์„œ๊ฐ€ ๋ณ€๊ฒฝ๋˜์—ˆ๋‚˜์š”? (e.g. `XCConfig`, `๋…ธ์…˜`, `README`)
- [ ] ์ด ์ž‘์—…์„ ํ•˜๊ณ ๋‚˜์„œ ๊ณต์œ ํ•ด์•ผํ•  ํŒ€์›๋“ค์—๊ฒŒ ๊ณต์œ ๋˜์—ˆ๋‚˜์š”? (e.g. `"API ๊ฐœ๋ฐœ ์™„๋ฃŒ๋์–ด์š”"`, `"XCConfig ๊ฐ’ ์ถ”๊ฐ€๋˜์—ˆ์–ด์š”"`)
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/Auto_close_associate_issue/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:20.14

COPY . .

CMD [ "node", "/main.js"]
16 changes: 16 additions & 0 deletions .github/actions/Auto_close_associate_issue/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Auto_close_associate_issue"

description: "Auto close an issue which associate with a PR."

inputs:
prbody:
description: "The body of the PR to search for related issues"
required: true

outputs:
issurNumber:
description: "The issue number"

runs:
using: "docker"
image: "Dockerfile"
16 changes: 16 additions & 0 deletions .github/actions/Auto_close_associate_issue/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
let body = process.env["INPUT_PRBODY"];

/*
PR Template์˜ resolved issue ๋„˜๋ฒ„ ํ‘œ๊ธฐ ๋ฐฉ์‹ ๋ณ€๊ฒฝ ์‹œ ํ•ด๋‹น ์ฝ”๋“œ ๋˜ํ•œ ๋ณ€๊ฒฝ ํ•„์š”
*/
let pattern = /Resolves: #\d+/;

let issueNumber;

try {
issueNumber = body.match(pattern)[0].replace("Resolves: #", "");
} catch {
issueNumber = -1;
}

console.log(`::set-output name=issueNumber::${issueNumber}`);
32 changes: 32 additions & 0 deletions .github/workflows/AutoCloseIssueByPullRequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Auto close issue when PR is merged

on:
pull_request_target:
branches-ignore: ["develop"]
types: [closed]
paths:
- "**/*.swift"

jobs:
close-issue:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true || github.event.action != 'closed'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run Auto issue closer
uses: ./.github/actions/Auto_close_associate_issue/
id: Closer
with:
prbody: ${{ github.event.pull_request.body }}

- name: Close Issue
uses: peter-evans/close-issue@v2
if: ${{ github.event.pull_request.merged }}
with:
issue-number: ${{ steps.Closer.outputs.issueNumber }}
comment: The associated PR has been merged, this issue is automatically closed, you can reopend if necessary. \#${{ github.event.pull_request.number }}
env:
Github_Token: ${{ secrets.GITHUB_TOKEN }}
PRNUM: ${{ github.event.pull_request.number }}
Loading