cleartax / jira-lint Goto Github PK
View Code? Open in Web Editor NEWA light-weight lint workflow when using GitHub along with JIRA for project management
License: MIT License
A light-weight lint workflow when using GitHub along with JIRA for project management
License: MIT License
Hey. One feature which would be really useful is to be able to configure the posting of gifs into the comments section of the github PR.
I've raised a pr #6 for this.
Thanks for the github action, its really good!
When pushing changes for a jira issue, sometimes engineers push changes for stories that are already closed or not pulled into the active sprint.
Reasons for issue status validation:
I propose introducing two new inputs into jira-lint
.
validate_issue_status
This should enable validation of jira issue status. By default this validation should be off.
allowed_issue_statuses
This should be used in conjunction with validate_issue_status
. When validate_issue_status
is true
, the allowed_issue_Statuses should be uses as a list of acceptable jira issue statuses provided by the consumer of jira-lint
. If validation is enabled, jira-lint
should compare the current status of the detected issue with the allowed_issue_statuses
. If no match is found then jira-lint
should fail the status check and put a comment on the PR with what is wrong.
Example comment when status validation fails
๐ The detected issue is not in one of the allowed statuses ๐
Detected Status | Done | โ |
---|---|---|
Allowed Statuses | In-Progress,In-Review | โ๏ธ |
Please ensure your jira story is in one of the allowed statuses
ABI-2999-incorrectly-populated-0-values-invoices
For ABC-1234-test-branch, JIRA key was extracted correctly and was ABC-1234 as expected.
For ABC-1234-test-branch-worda-0-wordb-wordc, the extracted key was POPULATED-0 and not ABC-1234.
Is it because the code expects the JIRA key in the end ? If so can we add a flag if the JIRA key should be expected in the beginning of the branch name ?
I am getting the following error
parser: null, maxHeadersCount: null, _redirectable: [Writable], [Symbol(kNeedDrain)]: false, [Symbol(isCorked)]: false, [Symbol(kOutHeaders)]: [Object: null prototype] }, response: { status: 403, statusText: 'Forbidden', headers: [Object], config: [Object], request: [ClientRequest], data: 'Basic auth with password is not allowed on this instance\n' }, isAxiosError: true, toJSON: [Function] } } ##[error]Request failed with status code 403
Run cleartax/jira-lint@master
with:
github-token: ***
jira-token: ***
jira-base-url: https://xxx.atlassian.net
skip-branches: ^(production-release|master|release\/v\d+)$
skip-comments: true
pr-threshold: 1000
validate_issue_status: false
allowed_issue_statuses: In Progress
Base branch -> develop
Head branch -> feature/DEV-1234[2](https://github.com/xxx/xxx/runs/xxx?check_suite_focus=true#step:2:2)9-xxx
branch 'feature/DEV-1234[3](https://github.com/xxx/xxx/runs/xxx?check_suite_focus=true#step:2:3)32[9](https://github.com/xxx/xxx/runs/xxx?check_suite_focus=true#step:2:9)xxx' does not match ignore pattern provided in 'skip-branches' option: /^(production-release|master|release\/v\d+)$/
JIRA key -> DEV-xxx
Adding lables -> [ 'Development', 'Task' ]
Error: Resource not accessible by integration
As a developer, I would like the pull request description to be updated with the details from the JIRA ticket even if the pull request description is empty/null.
For simple changes, the pull request title and/or commit comments are sufficient context for the pull request reviewer. In those cases, a pull request description may not be needed. In those instances, I would still like for the pull request description to be updated with the ticket details.
In this case, the value returned for 'body' is null
{
"body": null
}
the default value of '' is not honored and prBody is set to null below
const {
body: prBody = '',
} = pullRequest as PullRequestParams;
Here is the stack trace.
Run cleartax/jira-lint@master
with:
github-token: ***
jira-token: ***
jira-base-url: https://xxx.atlassian.net
skip-branches: ^(production-release|master|release\/v\d+)$
skip-comments: true
pr-threshold: 1000
validate_issue_status: false
allowed_issue_statuses: In Progress
Base branch -> master
Head branch -> feature/SEAR-XXX-postgres-disk-space-alert
branch 'feature/SEAR-XXX-postgres-disk-space-alert' does not match ignore pattern provided in 'skip-branches' option: /^(production-release|master|release\/v\d+)$/
JIRA key -> SEAR-XXX
{
error: TypeError: Cannot read property 'map' of undefined
at /home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:27867
at Generator.next (<anonymous>)
at fulfilled (/home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:26281)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
}
Error: Cannot read property 'map' of undefined
Appreciate your help.
Hey there, we were thinking of using this, however we noticed that this particular repo hasn't been updated since Dec 20th, 2020. I see there are quite a few forks and some very recent commits on some of them.
For this capability, is this repo still usable as-is, and are any of the other repos the "go-to" repo now? Are there better GitHub Actions to do this? I'm just trying to understand the lull in maintenance. Thank you.
Do not support project key within number, like "PP2", "P2P" in JIRA.
I create a PR and I meet some problem on PR checking. But the changes are small. I think you could fix it too.
My PR: #9
Hey all!
I'm using that action on my workflow, it already working but I want to change the API_KEY that I'm using.
I'm creating the KEY from the same user that working, encoding it properly echo "[email protected]:uoDllaxhXXXXXX0sf2f9D13" | base64
but I'm getting an Unauthorized Error :
}, response: { status: 401, statusText: 'Unauthorized', headers: [Object], config: [Object], request: [ClientRequest], data: 'Basic authentication with passwords is deprecated. For more information, see: [https://developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth/\n](https://developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth//n)' },
Is someone maybe familiar with a solution?
Would be nice if the comments' content could be customised via the action config.
I suppose that PR's created by dependabot should be skipped by default. But i saw error
error: Error: Input required and not supplied: jira-token
at Object.getInput (/home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:113632)
at p (/home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:20233)
at /home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:21131
at Generator.next (<anonymous>)
at /home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:19906
at new Promise (<anonymous>)
at n (/home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:19654)
at run (/home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:20939)
at Object.131 (/home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:23551)
at __webpack_require__ (/home/runner/work/_actions/cleartax/jira-lint/master/lib/index.js:1:154)
}
Error: Input required and not supplied: jira-token
Branch name: dependabot/npm_and_yarn/fortawesome/pro-regular-svg-icons-5.15.3
Jira lint file:
on: [pull_request]
jobs:
jira-lint:
runs-on: ubuntu-latest
steps:
- uses: cleartax/jira-lint@master
name: jira-lint
with:
github-token: <secret>
jira-token: <token>
jira-base-url: <attlasian-base-url>
skip-branches: '^(master)$'
skip-comments: false
pr-threshold: 1000
I see expected message only if i use skip-branches: '^master$|^dependabot.*'
.
Because there is no real way to make a distinction between when it should be a jira issue key of just a different string that happens to match the format, I think it's best to enforce the location of the issue of the jira key to be at the start of the PR title and to use the first match instead of the last, of course this is not backwards compatible so we need to bump a major version.
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.