Update update-base.yml

This commit is contained in:
Yanis48 2021-06-08 19:21:41 +02:00
parent f63e45a644
commit ddab5555cf
1 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,17 @@ jobs:
try {
// Updates the pull request with the latest upstream changes.
await github.pulls.updateBranch({ owner, repo, pull_number })
// Checks if the branch is a development version
if (contains(base, '-')) {
await github.issues.addLabels({ owner, repo, issue_number, labels: ['snapshot'] });
await github.issues.removeLabel({ owner, repo, issue_number, name: 'release' });
// Otherwise it's a release
} else {
await github.issues.addLabels({ owner, repo, issue_number, labels: ['release'] });
await github.issues.removeLabel({ owner, repo, issue_number, name: 'snapshot' });
}
} catch (error) {
// 422 is returned when there is a merge conflict
if (error.status === 422) {