abeyuya / actions-mention-to-slack Goto Github PK
View Code? Open in Web Editor NEWGithub Action for convert Github mention to Slack mention.
License: MIT License
Github Action for convert Github mention to Slack mention.
License: MIT License
se the error below
Error: Request failed with status code 504
at createError (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.6/dist/index.js:736:15)
at settle (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.6/dist/index.js:12997:12)
at IncomingMessage.handleStreamEnd (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.6/dist/index.js:13765:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
複数リポジトリをチームで開発していて、
メンバーが新規で入ってきた場合などに対応するのが大変なため。
私の方で余力があればPR出したいなと思います🙇♂️
@abeyuya
こちらのアクションを利用させていただきたいのですが、エラーになってしまいます。
アドバイスいただけますと幸いです。
HttpError: Not Found
at /home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/node_modules/@octokit/request/dist-node/index.js:86:1
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Object.loadFromGithubPath (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/src/modules/mappingConfig.ts:43:22)
at main (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/src/main.ts:255:21)
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)
Hi, I'm trying to setup slack mention action on github but I can't receive the messages in channel.
What my webhook need to do to action mention in a channel?
From the Workflow builder I can create a webhook workflow and choose the channel but I need to create a message text too and I don't know if I need to put a variable or not. Should I create an app intead?
Can you guide me ou show me an example?
hi! the last vesion is not working... 🤔
現在、issueやpull-requestなどに通知が発生すると思います。
今後、レビュー後のApprovedなどを通知させる予定はありますか??
回答いただけると嬉しいです!
This issue provides visibility into Renovate updates and their statuses. Learn more
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
いつもこちらのアクションを利用させてもらっています。ありがとうございます
organizationで利用する際、個人アカウントに依存しないようにしたく、GitHub Apps経由でprivate repositoryに保存された mention-to-slack.yml
を読み込むようにして複数のリポジトリで mention-to-slack.yml
を共有できるようにしたいと考えています
現在リポジトリが4つあり、
mention-to-slack.yml
が保存されたPrivateリポジトリ1 の hook で workflow を起動し、2 を呼び出すことで、3に保存されたmention-to-slack.yml
をcheckoutによりコピーしてきます。完了した後、4 を起動しSlackに通知するような仕組みです
GitHub Appsを経由する理由としては、権限問題を回避してPrivateリポジトリの情報を取得するためです
https://caddi.tech/archives/3737 (こちらのページを参考にしています)
当リポジトリのアクションでは
uses: abeyuya/actions-mention-to-slack@v2
with:
configuration-path: ***mention-to-slack.yml
のようにすると、メンション先が記述されたyamlファイルを指定できると理解しています
on:
issues:
types: [opened]
issue_comment:
types: [created]
pull_request:
types: [opened, review_requested]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created]
jobs:
mention-to-slack:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
# リポジトリのチェックアウト
- uses: actions/checkout@v3
# Github appsを使用して caddijp/common-github-actions private リポジトリを .github/actions/common にチェックアウト
- uses: org-repo/checkout-private-action@main
with:
app_id: ${{ secrets.CHECKOUT_PRIVATE_ACTION_APPS_ID }}
secret_key: ${{ secrets.CHECKOUT_PRIVATE_ACTION_APPS_SECRET }}
org: "org-repo"
repo: "slack-notification"
ref: "dev"
dist: "./.github/actions/common"
- name: Run
uses: k1z3/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_FOR_MENTION_DEV }}
icon-url: https://img.icons8.com/color/256/000000/github-2.png
bot-name: "Mention bot"
run-id: ${{ github.run_id }}
configuration-path: .github/actions/common/.github/actions/slack-to-mention/mention-to-slack.yml
アクション自体は最後まで正常に終了していることになっています
しかし、checkoutによって持ってきたファイルの場合は、以下のようなエラーがSlackに投稿されます (k1z3/actions-mention-to-slack
は4のことで、当リポジトリのForkです)
❗ An internal error occurred in mention-to-slack action)
(but action didn't fail as this action is not critical).
To solve the problem, please open an issue
HttpError: Not Found
at /home/runner/work/_actions/k1z3/actions-mention-to-slack/0.1.3/node_modules/@octokit/request/dist-node/index.js:86:1
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Object.loadFromGithubPath (/home/runner/work/_actions/k1z3/actions-mention-to-slack/0.1.3/src/modules/mappingConfig.ts:43:22)
at main (/home/runner/work/_actions/k1z3/actions-mention-to-slack/0.1.3/src/main.ts:246:21)
mention-to-slack.yml
ファイルについては、元々 1 のリポジトリに保存されている場合は、configuration-path
を指定しても問題なく読み込めます
しかし、fetchしたyamlを直接指定したり cat
して 1 のリポジトリのファイルに追記するような操作をすると、読み込めなくなってしまいます
ls
等で確認はしましたが、コピー自体は行われておりました
ちなみに存在しないパスを指定したとしても、このようなエラーになりました
もう少し単純なものにして検証も行いたいのですが、取り急ぎissueを立てさせていただきました
GH-Actions の知見が薄く申し訳ないですが、もし解決できる方法がありましたら教えていただけると嬉しいです
また、目的が達成できれば良いとも考えていますので、これ以外に良い方法を提案していただいても嬉しいです
よろしくお願いします
Thank you for making a good application.
August 3rd library update includes a fix for groups. As a result it now triggers twice on pull request review comment creation.
When I changed the trigger for pull_request_review_comment
to just edited
it worked as before, so I'll leave the information here.
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
pull_request:
types: [opened, edited, review_requested]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [edited]
HttpError: Not Found
at /home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/node_modules/@octokit/request/dist-node/index.js:86:1
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Object.loadFromGithubPath (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/src/modules/mappingConfig.ts:43:22)
at main (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/src/main.ts:255:21)
on: pull_request_review
TypeError: Cannot read property 'match' of null
at Object.module.exports.559.exports.pickupUsername (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:12814:23)
at Object.module.exports.131.exports.execNormalMention (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:2905:38)
at Object.module.exports.131.exports.main (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:2952:23)
at Object.325 (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:6470:8)
at __webpack_require__ (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:22:30)
at startup (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:37:19)
at /home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:41:18
at Object.<anonymous> (/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2.3/dist/index.js:44:10)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
%60%60%60%0AHttpError:%20Not%20Found%0A%20%20%20%20at%20/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/node_modules/@octokit/request/dist-node/index.js:86:1%0A%20%20%20%20at%20processTicksAndRejections%20(node:internal/process/task_queues:96:5)%0A%20%20%20%20at%20Object.loadFromGithubPath%20(/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/src/modules/mappingConfig.ts:43:22)%0A%20%20%20%20at%20main%20(/home/runner/work/_actions/abeyuya/actions-mention-to-slack/v2/src/main.ts:255:21)%0A%60%60%60
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.