ribtoks / tdg-github-action Goto Github PK
View Code? Open in Web Editor NEWGitHub action for project management using TODO comments
License: MIT License
GitHub action for project management using TODO comments
License: MIT License
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Dockerfile
golang 1.22-alpine
alpine 3.20
.github/workflows/go.yml
actions/setup-go v4
actions/checkout v3
.github/workflows/integration.yml
go.mod
go 1.14
github.com/google/go-github/v49 v49.1.0
gitlab.com/ribtoks/tdg v0.0.6
golang.org/x/oauth2 v0.15.0
I was wondering if it's possible for this tool to close issues with a comment from the commit message.
Example TODO comment
//TODO are we sure the below is correct?
var foo = bar;
Then someone could close it with this commit
-//TODO are we sure the below is correct?
var foo = bar;
answered TODO
Yes it's correct because lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Not sure if the commit message itself as the comment on the issue would be desired. In that case some kind of keyword could be used, like closingComment=
.
That would make the above look like
answered TODO
closingComment=Yes it's correct because lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
It would be really helpful if it's possible to assign the PR Author if a push created a new issue
If there're 2 identical issue titles in the different files, and both of the comments are "fixed"/removed, only 1 issue is closed.
I accidentally created 200 issues because i put the action after the npm install
script
I leave here the script i used to delete all those issues if anyone fucks up like i did 🤣
const GITHUB_TOKEN = ''
import { Octokit } from '@octokit/rest'
import { graphql } from '@octokit/graphql'
const octokit = new Octokit({ auth: GITHUB_TOKEN })
const data1 = await octokit.request('GET /repos/{owner}/{repo}/issues', {
owner: 'remorses',
repo: 'docs-from-notion',
per_page: 100,
})
for (let issue of data1.data) {
console.log('deleting issue ' + issue.title)
await graphql(
`
mutation {
deleteIssue(input: { issueId: "${issue.node_id}" }) {
repository {
name
}
}
}
`,
{
headers: {
authorization: 'token ' + GITHUB_TOKEN,
},
},
)
}
It looks like EXCLUDE_PATTERN doesn't seem to work properly.
EXCLUDE_PATTERN: ".*.\/(node_modules|dist|bin|files|themes)\/.*"
This is a valid regex that should match any exactly named directory.
However - it doesn't seem to filter anything out - you still get issues logged for files such as:
./files/somefile.txt
./themes/some/thing.txt
./themes/mytheme/node_modules/something.js
etc...
Somewhat related - would it also be better to accept a list/array of files/patterns to match on?, e.g:
exclude:
- "./node_modules/*"
- ".*/files/somefile"
- ".*/**/bacon.yu*"
or if it has to be a string:
exclude: |
"./node_modules/*"
".*/files/somefile"
".*/**/bacon.yu*"
Currently this action doesn't support Github Enterprise / on-prem installs.
Is there any plan or desire to support GHE?
I was digging through the github-go API and it does seem to support it with a
NewClient().WithEnterpriseURLs(...)
https://pkg.go.dev/github.com/google/go-github/v56/github#Client.WithEnterpriseURLs
However I'm not familiar enough with the library to know if this would do what is needed.
Hi! Thanks for this GH Action!
I'm having a small issue. When I have a space in a folder name inside my project structure, It breaks the hyperlink in the issue. Not sure if this is a GH link parsing problem or if something can be done in the Action to fix this. Maybe quote the link or something like that. Sorry if this is something pretty evident, I'm really new into the GH Actions environment.
Thanks!
I’m not sure if it’s somehow already possible to have this workflow add issues for TODO comments in Twig files. Or whether the feature request should more appropriately be placed elsewhere: https://gitlab.com/ribtoks/tdg/-/issues
Hi, receiving this from runs:
Current runner version: '2.272.0'
2
Operating System
6
Virtual Environment
10
Prepare workflow directory
11
Prepare all required actions
12
Download action repository 'actions/[email protected]'
13
Download action repository 'ribtoks/tdg-github-action@master'
14
##[error]ribtoks/tdg-github-action/master/action.yml (Line: 54, Col: 9): Unexpected value ''
15
##[error]ribtoks/tdg-github-action/master/action.yml (Line: 54, Col: 9): Unexpected value ''
16
##[error]System.ArgumentException: Unexpected type 'NullToken' encountered while reading 'outputs'. The type 'MappingToken' was expected.
17
at GitHub.DistributedTask.ObjectTemplating.Tokens.TemplateTokenExtensions.AssertMapping(TemplateToken value, String objectDescription)
18
at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
19
##[error]Fail to load ribtoks/tdg-github-action/master/action.yml
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.