Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
whtm
jd_scripts
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
jd_scripts
/
jdFactoryShareCodes.js
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
30 lines (30 loc) · 1.46 KB
main
Breadcrumbs
jd_scripts
/
jdFactoryShareCodes.js
Copy path
Top
File metadata and controls
Code
Blame
30 lines (30 loc) · 1.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
东东工厂互助码
此文件为Node.js专用。其他用户请忽略
支持京东N个账号
*/
//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
let shareCodes = [
'',//账号一的好友shareCode,不同好友中间用@符号隔开
'',//账号二的好友shareCode,不同好友中间用@符号隔开
]
// 判断github action里面是否有东东工厂互助码
if (process.env.DDFACTORY_SHARECODES) {
if (process.env.DDFACTORY_SHARECODES.indexOf('&') > -1) {
console.log(`您的互助码选择的是用&隔开\n`)
shareCodes = process.env.DDFACTORY_SHARECODES.split('&');
} else if (process.env.DDFACTORY_SHARECODES.indexOf('\n') > -1) {
console.log(`您的互助码选择的是用换行隔开\n`)
shareCodes = process.env.DDFACTORY_SHARECODES.split('\n');
} else {
shareCodes = process.env.DDFACTORY_SHARECODES.split();
}
} else if (process.env.DDFACTORY_SHARECODES) {
console.log(`由于您环境变量(DDFACTORY_SHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
}
for (let i = 0; i < shareCodes.length; i++) {
const index = (i + 1 === 1) ? '' : (i + 1);
exports['shareCodes' + index] = shareCodes[i];
}
You can’t perform that action at this time.