-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show "Disabled" state in github-actions-indicators
#6543
Show "Disabled" state in github-actions-indicators
#6543
Conversation
github-actions-indicators
github-actions-indicators
github-actions-indicators
github-actions-indicators
github-actions-indicators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes!
// Note: The response is not reliable. | ||
// Some workflow's path is '' and deleted workflow's state is 'active'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When does this happen? Is it just an empty string is or it just a consequence of .split().pop()
Also the state of deleted workflows is consistent/correct.
// Note: The response is not reliable. | |
// Some workflow's path is '' and deleted workflow's state is 'active'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check these bugs with calling API of getting refined-github/refined-github's workflow list.
# GET /repos/refined-github/refined-github/actions/workflows
curl -i -H "Authorization: token YOUR_TOKEN" https://api.github.com/repos/refined-github/refined-github/actions/workflows
Here is the query result for saving your time :)
[
{
"id": 178729,
"node_id": "MDg6V29ya2Zsb3cxNzg3Mjk=",
"name": "Test",
"path": "",
"state": "active",
"created_at": "2020-01-10T06:49:42.000+09:00",
"updated_at": "2020-01-11T01:03:31.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/178729",
"html_url": "https://github.com/refined-github/refined-github/blob/main",
"badge_url": "https://github.com/refined-github/refined-github/workflows/Test/badge.svg"
},
{
"id": 49251289,
"node_id": "W_kwDOAxXxWc4C74PZ",
"name": "actionlint",
"path": ".github/workflows/actionlint.yml",
"state": "active",
"created_at": "2023-02-23T19:04:16.000+09:00",
"updated_at": "2023-03-01T18:24:51.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/49251289",
"html_url": "https://github.com/refined-github/refined-github/blob/main/.github/workflows/actionlint.yml",
"badge_url": "https://github.com/refined-github/refined-github/workflows/actionlint/badge.svg"
},
{
"id": 11449857,
"node_id": "MDg6V29ya2Zsb3cxMTQ0OTg1Nw==",
"name": "CodeQL",
"path": ".github/workflows/codeql-analysis.yml",
"state": "active",
"created_at": "2021-07-20T16:08:53.000+09:00",
"updated_at": "2021-07-20T16:08:53.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/11449857",
"html_url": "https://github.com/refined-github/refined-github/blob/main/.github/workflows/codeql-analysis.yml",
"badge_url": "https://github.com/refined-github/refined-github/workflows/CodeQL/badge.svg"
},
{
"id": 10572899,
"node_id": "MDg6V29ya2Zsb3cxMDU3Mjg5OQ==",
"name": "Features",
"path": ".github/workflows/features.yml",
"state": "active",
"created_at": "2021-06-19T14:56:34.000+09:00",
"updated_at": "2021-08-24T22:46:39.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/10572899",
"html_url": "https://github.com/refined-github/refined-github/blob/main/.github/workflows/features.yml",
"badge_url": "https://github.com/refined-github/refined-github/workflows/Features/badge.svg"
},
{
"id": 2844040,
"node_id": "MDg6V29ya2Zsb3cyODQ0MDQw",
"name": "Labeler",
"path": ".github/workflows/labeler.yml",
"state": "active",
"created_at": "2020-10-04T14:49:14.000+09:00",
"updated_at": "2020-10-04T14:49:14.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/2844040",
"html_url": "https://github.com/refined-github/refined-github/blob/main/.github/workflows/labeler.yml",
"badge_url": "https://github.com/refined-github/refined-github/workflows/Labeler/badge.svg"
},
{
"id": 10549616,
"node_id": "MDg6V29ya2Zsb3cxMDU0OTYxNg==",
"name": "New feature",
"path": ".github/workflows/new-feature-checker.yml",
"state": "active",
"created_at": "2021-06-18T19:18:44.000+09:00",
"updated_at": "2021-06-18T20:31:13.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/10549616",
"html_url": "https://github.com/refined-github/refined-github/blob/main/.github/workflows/new-feature-checker.yml",
"badge_url": "https://github.com/refined-github/refined-github/workflows/New%20feature/badge.svg"
},
{
"id": 3562699,
"node_id": "MDg6V29ya2Zsb3czNTYyNjk5",
"name": "Release",
"path": ".github/workflows/release.yml",
"state": "active",
"created_at": "2020-11-12T14:56:40.000+09:00",
"updated_at": "2022-07-07T22:21:40.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/3562699",
"html_url": "https://github.com/refined-github/refined-github/blob/main/.github/workflows/release.yml",
"badge_url": "https://github.com/refined-github/refined-github/workflows/Release/badge.svg"
},
{
"id": 4737,
"node_id": "MDg6V29ya2Zsb3c0NzM3",
"name": "Test",
"path": ".github/workflows/test.yml",
"state": "active",
"created_at": "2019-12-19T10:57:00.000+09:00",
"updated_at": "2019-12-19T10:57:00.000+09:00",
"url": "https://api.github.com/repos/refined-github/refined-github/actions/workflows/4737",
"html_url": "https://github.com/refined-github/refined-github/blob/main/.github/workflows/test.yml",
"badge_url": "https://github.com/refined-github/refined-github/workflows/Test/badge.svg"
}
]
- API response returns some workflow's
path
value to empty string.- The 0th of array which name is "Test" is that.
- The deleted workflow's state should be 'deleted' but 'active' is coming.
.github/workflows/new-feature-checker.yml
is deleted workflow.
"state": {
"type": "string",
"enum": [
"active",
"deleted",
"disabled_fork",
"disabled_inactivity",
"disabled_manually"
],
"examples": [
"active"
]
},
I've created GitHub Issue ticket.
Co-authored-by: Federico Brigante <me@fregante.com>
if (!workflows) { | ||
return; // Impossibru, for types only | ||
} | ||
|
||
if (select.exists('.octicon-stop', workflowListItem)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out GitHub already had this indicator before, we were event skipping items that had it: https://docs.github.com/en/enterprise-server@3.4/actions/managing-workflow-runs/disabling-and-enabling-a-workflow
For this reason I replaced the Alert icon with a Stop icon
if (select.exists('.octicon-stop', workflowListItem)) { | |
// There might be a disabled indicator already | |
if (select.exists('.octicon-stop', workflowListItem)) { |
Thank you for your contributions! |
Closes Add "Disable" icon to
github-actions-indicators
#6529This is my first PR. I'm good at VanilaJS and Chrome Extensions but not TypeScript.
Blaming my code is Welcome!
May the next PR will be Impl Linkify
github-actions-indicators
#6443.I've implemented it through the details component, but not Just with SVG Icon.
My low css skill is going to bother me.
Thank you for maintaining this awesome project.
Test URLs
https://github.com/134130/134130/actions
Screenshot