Addition of payload for the discussion room please add to the script
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- github, javascript, typescript
Rechercherichtung
Start by reproducing the TypeError with the actions/github-script@v5 entry point and inspect how the github client exposes Discussions methods. Trace the context.payload.discussion data used by the script and determine the project’s expected support boundary; done should be a verified, documented way to handle discussion-room payloads and comments.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is your feature request related to a problem? Please describe.
please include payload for github discussion rooms as well
Describe the solution you'd like
Add this to any of your version i got this from google but its not working as expected
- name: Reply with GIF
uses: actions/github-script@v5
with:
github-token: ${{ secrets.SECRET_TOKEN }}
script: |
const { data } = await github.discussions.get({
discussion_number: context.payload.discussion.number,
...context.repo
});
const { data: comment } = await github.discussions.createComment({
discussion_number: context.payload.discussion.number,
...context.repo,
body: ''
});
console.log(`Replied to discussion ${data.html_url} with GIF comment ${comment.html_url}`);
Describe alternatives you've considered
As this is required for the automatic replies to the discussion room with GIF please help in integrating with it
Erros while running above action*
with:
github-token: ***
script: const { data } = await github.discussions.get({
discussion_number: context.payload.discussion.number,
...context.repo
});
const { data: comment } = await github.discussions.createComment({
discussion_number: context.payload.discussion.number,
...context.repo,
body: '5c3d6bab0b760e1981[4](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:4)4301a[5](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:5)eb2b5/Automated_response.gif)'
});
console.log(`Replied to discussion ${data.html_url} with GIF comment ${comment.html_url}`);
debug: false
user-agent: actions/github-script
result-encoding: json
TypeError: Cannot read property 'get' of undefined
at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:4888:5[6](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:6)), <anonymous>:1:43)
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:4889:12)
at main (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:4943:26)
at Module.2[7](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:7)2 (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:4927:1)
at __webpack_require__ (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:24:31)
at startup (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:43:19)
at /home/runner/work/_actions/actions/github-script/v5/dist/index.js:49:1[8](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:8)
at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v5/dist/index.js:52:10)
at Module._compile (internal/modules/cjs/loader.js:[9](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:9)99:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:[10](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:10)[27](https://github.com/organizationname/athena-poc-design1/actions/runs/4871059058/jobs/8687563850#step:4:28):10)
Error: Unhandled error: TypeError: Cannot read property 'get' of undefined
- Vorherrschende Sprache
- TypeScript
- Sterne
- 5k
- Forks
- 586
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus actions/github-script
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
actions/github-script#728 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
actions/github-script#727 · 1 Reaktion ·
-
{ Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
actions/github-script#724 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
actions/github-script#723 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
actions/github-script#714 · 1 Kommentar · 4 Reaktionen ·
Alle Issues in actions/github-script
Ähnliche Issues
-
blocklist removal
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
pastelsky/bundlephobia#1122 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100