Skip to content

Commit

Permalink
Clarify token precedence between GitHub and GitLab
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed Nov 7, 2024
1 parent 8769d0f commit aed17f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
OTA_ENGINE_SENDINBLUE_API_KEY='xkeysib-3f51c…'
OTA_ENGINE_SMTP_PASSWORD='password'

# If both GitHub and GitLab tokens are defined, GitHub takes precedence for dataset publishing
OTA_ENGINE_GITHUB_TOKEN=ghp_XXXXXXXXX

OTA_ENGINE_GITLAB_TOKEN=XXXXXXXXXX
OTA_ENGINE_GITLAB_RELEASES_TOKEN=XXXXXXXXXX
1 change: 1 addition & 0 deletions scripts/dataset/publish/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import publishGitHub from './github/index.js';
import publishGitLab from './gitlab/index.js';

export default function publishRelease({ archivePath, releaseDate, stats }) {
// If both GitHub and GitLab tokens are defined, GitHub takes precedence
if (process.env.OTA_ENGINE_GITHUB_TOKEN) {
return publishGitHub({ archivePath, releaseDate, stats });
}
Expand Down

0 comments on commit aed17f3

Please sign in to comment.