Skip to content

Commit 58e3c54

Browse files
authored
Release v1.0.1
Merge pull request #13 from mathze/develop
2 parents 0032545 + 059f18c commit 58e3c54

File tree

8 files changed

+126
-13
lines changed

8 files changed

+126
-13
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Data/Screenshots**
24+
If applicable, add logs, screenshots or other content to help explain your problem and our investigation.
25+
26+
**System (please complete the following information):**
27+
- Runner-OS: [e.g. ubuntu-latest]
28+
- Action-Version: [e.g. v1]
29+
30+
**Additional context**
31+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Getting help
4+
url: https://github.com/mathze/workflow-dispatch-action/discussions/categories/q-a
5+
about: Still not what you need? Have a look in our discussions Q&A
6+
- name: Search existing issues
7+
url: https://github.com/mathze/workflow-dispatch-action/issues
8+
about: If the wiki wasn't helpfull, please check for existing issues.
9+
- name: Talk with us
10+
url: https://github.com/mathze/workflow-dispatch-action/discussions
11+
about: Maybe also this may be interesting

.github/ISSUE_TEMPLATE/enhancement.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Enhancement
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
***Pro's and Con's***
19+
What are benefits of this alternative and what might its drawbacks.
20+
21+
**Additional context**
22+
Add any other context or screenshots about the feature request here.

CODE_OF_CONDUCT.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Community leaders have the right and responsibility to remove, edit, or reject c
3232
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
3333

3434
== Enforcement
35-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at mailto:abuse%25qualersoft@gmx.net[abuse%qualersoft@gmx.net,CoC-violation-report]. All complaints will be reviewed and investigated promptly and fairly.
35+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at mailto:abuse%25gh_mathze@gmx.net[abuse%gh_mathze@gmx.net,CoC-violation-report]. All complaints will be reviewed and investigated promptly and fairly.
3636

3737
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
3838

CONTRIBUTING.adoc

+47-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,53 @@
1-
= Contributing to robotframework-gradle-plugin
1+
= Contributing to workflow-dispatch-action
22
:toc:
3+
:toc-placement!:
4+
:gh_repo: https://github.com/mathze/workflow-dispatch-action
35

46
👍🎉 First off, thanks for taking the time to contributing 🎉👍
7+
Any kind of contribution is welcome😊
8+
9+
toc::[]
510

611
== Code of conduct
712
This project and everyone participating in it is governed by the link:CODE_OF_CONDUCT.adoc[Code of Conduct]
13+
14+
== Found a bug?
15+
* Ensure the bug was not already reported by searching our {gh_repo}/issues[issues]
16+
* Check for an existing {gh_repo}/discussions[discussion] on your issue
17+
* If you're unable to find an open issue addressing the problem by creating a {gh_repo}/issues/new?assignees=&labels=&template=bug_report.md&title=[new bug ticket]
18+
19+
== Found a security vulnerability?
20+
Please refer to our link:SECURITY.adoc[SECURITY] advisory
21+
22+
== Have an improvement idea?
23+
Very cool! Let's get it into the project!
24+
25+
* First make sure your idea isn't already addressed by a {gh_repo}/issues[feature request] or already in {gh_repo}/discussions[discussion]
26+
* If a feature request already exists and no one is assigned to it, you can leaf a comment on it that you are interested in work on it or vote for it (see <<Working with issues>>)
27+
* If there is a discussion about your idea, participate in it.
28+
* If neither a discussion nor a feature request exists, feel free to create a {gh_repo}/issues/new?assignees=&labels=&template=enhancement.md&title=[new feature request]
29+
30+
== Working with issues
31+
To keep the information of any issue on its essentials, please respect the following guidelines:
32+
33+
* any discussion shall take place in {gh_repo}/discussions/categories/issues[discuss an issue]. There is no "`golden rule`" from when a discussion in an issue get out of hand, and a discussion should be opened. But a rule of thumb is: "If there are any conflictive opinions, open a discussion"
34+
* If a discussion about an issue exists it shall be linked.
35+
* Discussions about an issue must have the issue's id within its title
36+
* Us 👍 or 👎 on the issue (not a single comment, see <<Discussions on issues>>) to up/down vote it. +
37+
Note:: Do not add comments like "+1", "-1", "Want that", "Disagree"; Such comments will be deleted.
38+
39+
== Discussions
40+
{gh_repo}/discussions[Here] is the place where you can share your ideas, ask or answer questions.
41+
42+
=== Discussions on issues
43+
To up or down vote an idea/comment, use 👍 or 👎 respectively. Avoid cluttering the discussion with "+1", "-1", "like", "dislike" etc. comments. +
44+
If you write a comment, it should provide value to the discussion.
45+
46+
== Code review
47+
This project encourages actively reviewing the code, as it will store your precious data, so it's common practice to receive comments on provided patches.
48+
49+
If you are reviewing other contributor's code please consider the following when reviewing:
50+
51+
* Be nice. Please make the review comment as constructive as possible so all participants will learn something from your review.
52+
53+
As a contributor, you might be asked to rewrite portions of your code to make it fit better into the upstream sources.

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/kotlin/model/WorkflowRun.kt

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ data class WorkflowRun(
1313
enum class RunStatus(private val value: String) {
1414
QUEUED("queued"),
1515
IN_PROGRESS("in_progress"),
16-
COMPLETED("completed");
16+
COMPLETED("completed"),
17+
REQUESTED("requested"),
18+
WAITING("waiting");
1719

1820
fun match(restState: String): Boolean = value == restState
1921

2022
companion object {
2123
fun from(value: String?) = value?.let {
22-
values().first {
24+
values().firstOrNull {
2325
it.match(value)
24-
}
26+
} ?: throw IllegalArgumentException("Cannot map unknown value '$value' to RunStatus!")
2527
}
2628
}
2729
}
@@ -40,7 +42,7 @@ enum class RunConclusion(val value: String) {
4042
fun from(value: String?) = value?.let {
4143
values().firstOrNull {
4244
it.value == value
43-
}
45+
} ?: throw IllegalArgumentException("Cannot map unknown value '$value' to RunConclusion!")
4446
}
4547
}
4648
}

src/main/kotlin/usecases/WorkflowRuns.kt

+7-6
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,18 @@ class WorkflowRuns(
7979

8080
// 3. if external ref id is present we check jobs of the runs
8181
val candidate = if (null != externalRefId) {
82-
// before we check we update the 'jobs' entry
8382
runs.filter {
8483
// if we have an external ref id we only can consider runs that have jobs
85-
it.status != RunStatus.QUEUED
84+
it.status != RunStatus.QUEUED &&
85+
it.status != RunStatus.REQUESTED &&
86+
it.status != RunStatus.WAITING
8687
}.firstOrNull { run ->
87-
// normally here job should never be null (ensured by updateRunDetails)
88-
run.jobs!!.let {
89-
// before we check we update the jobs entry
88+
// normally here the job should never be null (ensured by updateRunDetails)
89+
run.jobs?.let {
90+
// before we check, we update the jobs entry
9091
it.fetchJobs(client)
9192
it.hasJobWithName(externalRefId)
92-
}
93+
} ?: false // but in case, it is equal to `false` (has no job with name)
9394
}
9495
} else { // Otherwise, we take the first closest to dispatch date
9596
runs.sortedWith(compareBy { it.dateCreated }).firstOrNull()

0 commit comments

Comments
 (0)