-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3.0' into 3023-fix-cookie-string-parser
- Loading branch information
Showing
261 changed files
with
6,848 additions
and
2,374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: "PR merged" | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
close_and_notify: | ||
name: Close issues and notify | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const prNumber = context.payload.number | ||
const branch = context.baseRef | ||
const isDevelop = branch === "develop" | ||
const commentBody = `<!--closing-comment-->\nThis issue has been closed in #${prNumber}. The change will be included in the upcoming ${isDevelop ? "minor" : "patch"} release.` | ||
const query = `query($number: Int!, $owner: String!, $name: String!) { repository(owner: $owner, name: $name) { | ||
pullRequest(number: $number) { | ||
id | ||
closingIssuesReferences (first: 10) { edges { node { number } } } | ||
} | ||
} | ||
}` | ||
const res = await github.graphql(query, {number: prNumber, owner: context.repo.owner, name: context.repo.repo}) | ||
const linkedIssues = res.repository.pullRequest.closingIssuesReferences.edges.map( | ||
edge => edge.node.number | ||
) | ||
for (const issueNumber of linkedIssues) { | ||
const res = await github.rest.issues.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issueNumber, | ||
state: "closed", | ||
state_reason: "completed" | ||
}) | ||
if (res.status === 200) { | ||
await github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issueNumber, | ||
body: commentBody, | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.