Repository navigation
Releases
v0.1.0
uses: github.com/mozership/probe-github-notes@76735813d682751a3b743a0dbce0ad49a8d372ad # v0.1.0The first release of probe-github-notes, a Probe action that puts the notes of a run on GitHub.
Highlights
- A step gives the action the
notescontext of Probe, andtochooses where they go: a comment on the pull request, the summary of the GitHub Actions job, or an issue. - One comment, or one open issue, is kept for each
keyand edited on the next run, so that runs on each push or each night do not pile up. - A run with no notes edits the comment to say so, and closes the issue, so that old notes do not stand as current.
- The action keeps to the guard of a run: under
--read-onlyonly the summary is written, and under--allow-hostthe host of the API is checked.
Putting the notes on a pull request
A last job, which needs the others with always, reads the notes of them all:
- name: Notes
needs: [agent]
always: true
steps:
- name: Put the notes on the pull request
uses: github-notes
with:
to: comment
token: "{{vars.github_token}}"
notes: "{{ notes }}"The comment counts the notes of each level, and lists them under their job and step, with the status of the step, each in a GitHub alert of its level:
The run left 1 note: 1 warning.
### Leave
**A note** · passed
> [!WARNING]
> **Slow**
>
> The page took 4s.Without a pull request, as on a push, to: comment passes without posting. to: summary needs no token, and to: issue takes a title and labels, by which the action finds the issue again. A part of the notes goes in a comment of its own with a key of its own, as notes: "{{ filter(notes, .level == 'critical') }}" with key: critical.
A value Probe hides, <secret:NAME> or <redacted>, is written as text outside code, as GitHub would drop it as an HTML tag. A page longer than GitHub takes, 65536 characters in a comment or an issue and 1 MiB in a summary, leaves out its last notes and says how many.
Requirements
The action needs Probe v1.32.0 or later, the first with the notes context. See the README.
Changelog
- 3806b59 Escape masks in the names of jobs and steps, and after an escaped backtick
- 840bd25 Keep pages within what GitHub takes, and masks out of code exactly
- 7e85fd0 Keep the longest page that fits, within what is left, and writes as writes
- b812d9b Merge pull request #1 from mozership/feat/action
- 77101b8 Put the notes of a run on GitHub
- e7004f9 Read the summary in the step that writes it
- eb82428 Start probe-github-notes with its license
- 42665c7 Take only a body that starts with the marker as the action's own