https://github.com/frieder/gha-jira-login
A Github action to log into Atlassian Jira
https://github.com/frieder/gha-jira-login
action atlassian github jira login
Last synced: about 1 year ago
JSON representation
A Github action to log into Atlassian Jira
- Host: GitHub
- URL: https://github.com/frieder/gha-jira-login
- Owner: frieder
- License: mit
- Created: 2024-05-13T13:42:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-31T03:45:25.000Z (about 1 year ago)
- Last Synced: 2025-04-11T22:12:06.299Z (about 1 year ago)
- Topics: action, atlassian, github, jira, login
- Language: JavaScript
- Homepage:
- Size: 650 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Action - Jira Login
[](https://github.com/frieder/gha-jira-login/actions/workflows/pr.yml)
[](https://github.com/frieder/gha-jira-login/issues?q=is%3Aopen+is%3Aissue)
[](https://sonarcloud.io/project/overview?id=frieder_gha-jira-login)
[](https://snyk.io/test/github/frieder/gha-jira-login)
A Github action that takes access credentials and verifies them again Jira REST API.
Upon successful login, the credentials are stored locally in `~/jira/config.yml`.
This behavior is in line with how [atlassian/gajira-login](https://github.com/marketplace/actions/jira-login)
works to act as a drop-in replacement.
> Atlassian does not maintain its Github actions anymore. This is an issue since they are
> built with Node v16, which has been marked deprecated by Github and will soon get removed.
Instead of just writing the data to the file, it performs a login attempt to verify the
provided credentials. This allows to fail early if the credentials are incorrect.
## Usage
```yaml
name: Test Action
on:
[..]
env:
JIRA_BASE_URL: ${{ secrets.JIRA_URL }} # https://???.atlassian.net
JIRA_USER_EMAIL: ${{ secrets.JIRA_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: Jira Login
uses: frieder/gha-jira-login@v1
with:
baseUrl: ${{ secrets.JIRA_URL }}
email: ${{ secrets.JIRA_EMAIL }}
token: ${{ secrets.JIRA_TOKEN }}
```
The access information can be provided either as direct action arguments or by setting
env variables. For the env variable names it will use the same names as Atlassian's
login action does to allow for a drop-in replacement. When both are provided, the
input fields take precedence over the env variables.
## Build Code
Install packages: `npm i`
Compile code: `npm run build`
Format code: `npm run format`
Format check: `npm run format-check`
Code check: `npm run lint`
## Test Action
This action can be tested during development with the use of https://github.com/nektos/act.
```
act -j check -s JIRA_URL=*** -s JIRA_EMAIL=*** -s JIRA_TOKEN=***
```