Commit Graph

22 Commits

Author SHA1 Message Date
Shawn Hartsell
c7838fced0 fixing lint error in sync.go 2024-01-16 15:32:24 -06:00
Shawn Hartsell
3b3893d774 updating repoames to use os pkg instead of ioutil pkg after upgrading to Go 1.21 2024-01-16 15:31:59 -06:00
Florian Wagner
e30fad8050 adding missing error handling for GET repo
Signed-off-by: Florian Wagner <h2floh@github.com>
2022-11-04 06:15:14 +00:00
Florian Wagner
ef922b8e3b refactor repository retrieval/creation
Signed-off-by: Florian Wagner <h2floh@github.com>
2022-11-04 04:43:03 +00:00
Florian Wagner
6d732db1cf add push flag to indicate target it GHAE
Signed-off-by: Florian Wagner <h2floh@github.com>
2022-11-03 06:56:42 +00:00
Florian Wagner
86c578bdf2 set visibility to internal for GHAE
Signed-off-by: Florian Wagner <h2floh@github.com>
2022-11-03 06:15:23 +00:00
Ajaykn-mac
0ae35c149f fix go lint 2022-09-26 13:28:19 +09:00
Ajaykn-mac
db79671e1d Fix impersonation token error in case of missing site_admin scope 2022-09-26 12:59:57 +09:00
Denys Zhuravel
4b5fb2c8ad Add a note about the site_admin scope
* add a note to the readme
* add a note to the autogenerated cli help
2022-09-21 12:05:27 +00:00
Denys Zhuravel
37946dfc91 Require site_admin for the impersonation logic
Also, fixed casing in the text literals
2022-09-21 11:59:16 +00:00
Denys Zhuravel
a7d588cf7c Don't enable the impersonation by default.
* Require the impersonation to be explicit with the --actions-admin-user flag
* Reword the log messages to look the same way the existing messages are
2022-09-20 09:48:29 +00:00
Denys Zhuravel
c32265a4df Add actions-admin-user to readme 2022-09-09 09:35:07 +00:00
Denys Zhuravel
7ef65dedf2 Add a --actions-admin-user flag
Same as in here
33463970b8/internal/push/push.go (L106-L113)

Add a warning about the missing site_admin scope in the token
Add a way to ignore the actions admin impersonation.
2022-09-09 09:35:01 +00:00
Florian Wagner
bde5f88201 bump go modules
Signed-off-by: GitHub <noreply@github.com>
2022-04-26 03:37:19 +00:00
PJ Quirk
092b199c45 Fix a spelling mistake 2020-09-25 15:31:52 -04:00
Chris Sidi
d39e48f007 Create org if necessary 2020-09-22 13:57:42 -04:00
Chris Sidi
4e5bb47042 Better error message when org doesn't exist
* Produce a better error message when the destination org doesn't exist.
* Support pushing to the authenticated user's account

**Before**
`error creating github repository `synced-actions/setup-node`: error creating repository: POST http://my-ghes-hostname/api/v3/orgs/synced-actions/repos: 404 Not Found []`

**After**
`error creating github repository `synced-actions/setup-node`: Organization `synced-actions` doesn't exist at http://my-ghes-hostname. You must create it first.`

https://github.com/actions/actions-sync/issues/1
2020-09-21 22:08:06 -04:00
Chris Sidi
fec74ead01 Add more tests 2020-09-21 12:08:01 -04:00
Chris Sidi
8862a56600 Honor repo flags on sync and push 2020-09-18 17:15:16 -04:00
Chris Gavin
732ce15227 Fix some incorrect error messages. 2020-08-06 15:03:38 +01:00
Anthony Sterling
c6f5906aa1 add nil check for create repo response 2020-07-13 13:24:20 +01:00
Anthony Sterling
f7954c5ebf Rename project to actions-sync 2020-07-02 19:36:10 +01:00