A GitHub action to find an issue or pull request comment with links and optionally set them as the body of the current pull request.
The action will output the links found based on the criteria given
Original source based off of https://github.com/peter-evans/find-comment
- name: Find links in comment
uses: getkalido/action-auto-link-aggregator@v2
id: fc
with:
issue-number: 1
domain-filters: monday.com|github.com
- name: Find links in comment
uses: getkalido/action-auto-link-aggregator@v2
id: fc
with:
issue-number: 1
- name: Find links in comment
uses: getkalido/action-auto-link-aggregator@v2
id: fc
with:
issue-number: 1
domain-filters: monday.com|github.com
set-links-as-pr-comment: true
Name | Description | Default |
---|---|---|
token |
GITHUB_TOKEN or a repo scoped PAT. |
GITHUB_TOKEN |
repository |
The full name of the repository containing the issue or pull request. | github.repository (Current repository) |
current-branch |
The current branch that the repo is on. | HEAD |
issue-number |
The target/base branch of the PR. | origin/staging |
issue-number |
The number of the issue or pull request in which to search. | github.event.pull_request.number |
domain-filters |
Filters for the links to include only certain ones. | |
set-links-as-pr-comment |
Flag to set the links found as the body on the PR | false |
The links
and authors
of the comments matchng the domians found will be output for use in later steps in a links list
The list will be an empty if no matching comment was found.
In addition a base64 version of the list will also be included when the list cannot be parsed by the receiving language (eg. Perl)
Note that in order to read the step outputs the action step must have an id.
- name: Find links in comment
uses: getkalido/action-auto-link-aggregator@v2
id: fc
with:
issue-number: 1
domain-filters: monday.com|github.com
- run: |
echo ${{ steps.fc.outputs.links }}
echo ${{ steps.fc.outputs.linksb64 }}
The link list is output in the following format:
Link {
id: string;
author: string;
link: string;
name: string;
}
Run npm install
to fetch all the packages needed