forked from axios/axios
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): fixed release notification action; (axios#6064)
- Loading branch information
1 parent
7144f10
commit 7009715
Showing
4 changed files
with
36 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
import axios from '../index.js'; | ||
import {colorize} from "./helpers/colorize.js"; | ||
|
||
const {GITHUB_TOKEN} = process.env; | ||
|
||
GITHUB_TOKEN ? console.log(`[GITHUB_TOKEN OK]`) : console.warn(`[GITHUB_TOKEN is not defined]`); | ||
|
||
const defaultTransform = axios.defaults.transformRequest; | ||
|
||
export default axios.create({ | ||
transformRequest: [defaultTransform[0], function (data) { | ||
console.log(colorize()`[${this.method.toUpperCase()}] Request [${new URL(axios.getUri(this)).pathname}]`); | ||
return data; | ||
}], | ||
baseURL: 'https://api.github.com/', | ||
headers: { | ||
Authorization: GITHUB_TOKEN ? `token ${GITHUB_TOKEN}` : null | ||
} | ||
}) | ||
}); |
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 |
---|---|---|
@@ -1 +1 @@ | ||
Hello, @{{ author.login }}! This PR has been published in [{{ release.tag }}]({{ release.url }}) release. Thank you for your contribution ❤️! | ||
Hi, @{{ author.login }}! This PR has been published in [{{ release.tag }}]({{ release.url }}) release. Thank you for your contribution ❤️! |