Skip to content

Commit

Permalink
Update commands.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mordamax committed Jul 18, 2024
1 parent 1a035b2 commit cb854bd
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,21 @@ jobs:
with:
github-token: ${{ steps.commands_token.outputs.token }}
script: |
# const commentBody = '/cmd bench --runtime kusama --pallet pallet_indices' //context.payload.comment.body;
# // extract with regex the command
# const readArgs = commentBody.match(/^\/cmd ([\w-]+)(.*)$/);
# const command = readArgs[1].trim();
# const args = readArgs[2].trim();
#
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: `Command started! [Link to pipeline](${context.runId})`
# })
const commentBody = '/cmd bench --runtime kusama --pallet pallet_indices' //context.payload.comment.body;
// extract with regex the command
const readArgs = commentBody.match(/^\/cmd ([\w-]+)(.*)$/);
const command = readArgs[1].trim();
const args = readArgs[2].trim();
console.log(`Command: ${command} ${args}`);
console.log(`context.issue.number: ${context.issue}`);
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Command started! [Link to pipeline](${context.runId})`
})
# return `${command} ${args}`.trim();
return `bench --runtime kusama --pallet pallet_indices`;
Expand Down

0 comments on commit cb854bd

Please sign in to comment.