-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Se crear un archivo YAML para automatizar la impresion de issues en el readme
- Loading branch information
1 parent
def281c
commit dab2522
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Actualizar lista de issues en README | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
actualizar_readme: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Obtener Lista de issues abiertos | ||
id: obtener_lista_issues | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const issues = await github.issues.listForRepo({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
per_page: 100, | ||
state: 'open' | ||
}); | ||
const issueList = issues.data.map(issue => `* [${issue.title}](${issue.html_url})`).join('\n'); | ||
return issueList; | ||
- name: Actualizar Readme | ||
uses: actions/replace-text@v2 | ||
with: | ||
file: README.md | ||
regex: '## Issues Abiertas.*' | ||
replacement: | | ||
## Issues Abiertas | ||
${{ steps.obtener_lista_issues.outputs.result }} |