Compare commits

...

3 Commits

Author SHA1 Message Date
You-Sheng Yang 5cdb2b1e10
Merge 9b92a3558d into 44c2b7a8a4 2024-05-02 17:54:06 +02:00
Cory Miller 44c2b7a8a4
README: Suggest `user.email` to be `41898282+github-actions[bot]@users.noreply.github.com` (#1707)
* README: Set `user.email` to GitHub Actions Bot

* Update workflow to use proper bot GitHub Bot email

* Prefix `user.email` with `41898282+`

To match squash merge user, else showing as two different users, see: b0948d0da0

* Update README.md

---------

Co-authored-by: Pelle Wessman <pelle@kodfabrik.se>
2024-04-30 11:50:54 -04:00
You-Sheng Yang 9b92a3558d getFetchUrl: compose url with full service url
actions/checkout maybe used by Gitea, which allows installing the
server instance in a subdirectory to the service root, therefore a full
serviceUrl must be used.

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
2024-03-22 00:08:33 +08:00
4 changed files with 7 additions and 8 deletions

View File

@ -27,8 +27,8 @@ jobs:
fetch-depth: 0
- name: Git config
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Tag new target
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
- name: Push new tag

View File

@ -279,8 +279,9 @@ jobs:
- uses: actions/checkout@v4
- run: |
date > generated.txt
git config user.name github-actions
git config user.email github-actions@github.com
# Note: the following account information will not work on GHES
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "generated"
git push

3
dist/index.js vendored
View File

@ -2446,8 +2446,7 @@ function getFetchUrl(settings) {
const user = settings.sshUser.length > 0 ? settings.sshUser : 'git';
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
return `${serviceUrl}/${encodedOwner}/${encodedName}`;
}
exports.getFetchUrl = getFetchUrl;
function getServerUrl(url) {

View File

@ -16,8 +16,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
return `${serviceUrl}/${encodedOwner}/${encodedName}`
}
export function getServerUrl(url?: string): URL {