Skip to content

Commit

Permalink
chore: adding action test
Browse files Browse the repository at this point in the history
  • Loading branch information
vitormalencar committed Aug 18, 2023
1 parent 6296545 commit 8d23984
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Test QR Code Commenter

on:
pull_request

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Post QR Code Comment
uses: vitormalencar/qr-code-commenter-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
links: "https://example.com"
messages: "Here is a QR Code for you!"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/

# DS_Store files
.DS_Store
# Editors
.vscode/
.idea/
Expand Down
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ async function run() {

commentBody += `${message}\n\n![QR Code](${qrCodeDataURL})\n\n`;
}

if (context.payload.pull_request == null) {
throw new Error("No pull request found.");
}
// Comment in PR
await octokit.issues.createComment({
...context.repo,
Expand Down

0 comments on commit 8d23984

Please sign in to comment.