-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: testando action #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29923,10 +29923,14 @@ function wrappy (fn, cb) { | |
|
||
Object.defineProperty(exports, "__esModule", ({ value: true })); | ||
exports.wait = void 0; | ||
exports.stringify = stringify; | ||
const wait = (timeout) => { | ||
return new Promise(resolve => setTimeout(resolve, timeout)); | ||
}; | ||
exports.wait = wait; | ||
function stringify(obj) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Função 'stringify' adicionada sem verificação de tipo |
||
return JSON.stringify(obj, undefined, 2); | ||
} | ||
|
||
|
||
/***/ }), | ||
|
@@ -29999,6 +30003,7 @@ exports.compareCommits = compareCommits; | |
const fs_1 = __nccwpck_require__(9896); | ||
const github = __importStar(__nccwpck_require__(3228)); | ||
const core = __importStar(__nccwpck_require__(7484)); | ||
const helpers_1 = __nccwpck_require__(253); | ||
function getGithubToken() { | ||
return core.getInput('GITHUB_TOKEN') || process.env.GITHUB_TOKEN || ''; | ||
} | ||
|
@@ -30012,13 +30017,14 @@ async function getPRDetails() { | |
if (!token) | ||
throw new Error('GITHUB_TOKEN is not set'); | ||
const event = getEventData(); | ||
console.log('EVENT:', event); | ||
console.log('EVENT: \n', (0, helpers_1.stringify)(event)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uso de console.log para debug There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uso de 'console.log' para depuração |
||
const params = { | ||
owner: event.repository.owner.login, | ||
repo: event.repository.name, | ||
pull_number: 10 | ||
pull_number: event.number | ||
}; | ||
const octokit = github.getOctokit(token); | ||
console.log('PARAMS: \n', (0, helpers_1.stringify)(params)); | ||
const response = await octokit.rest.pulls.get(params); | ||
const result = { | ||
action: event.action, | ||
|
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export const wait = (timeout: number): Promise<any> => { | ||
return new Promise(resolve => setTimeout(resolve, timeout)); | ||
}; | ||
|
||
export function stringify(obj: any): string { | ||
return JSON.stringify(obj, undefined, 2); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A função 'stringify' está sendo exportada duas vezes.
A linha 29926 exporta 'stringify' duas vezes, o que é redundante. A exportação deve ser feita apenas uma vez.